fix: wrong month display in calendars
This commit is contained in:
@@ -89,7 +89,7 @@ onRender((ctx) => {
|
||||
ctx.font = "10px NDS10";
|
||||
ctx.letterSpacing = "2px";
|
||||
|
||||
const timeText = `${month}/${year}`;
|
||||
const timeText = `${(month + 1).toString().padStart(2, "0")}/${year}`;
|
||||
const { actualBoundingBoxRight: width } = ctx.measureText(timeText);
|
||||
|
||||
ctx.fillText(
|
||||
|
||||
@@ -79,7 +79,7 @@ onRender((ctx) => {
|
||||
ctx.font = "10px NDS10";
|
||||
ctx.letterSpacing = "2px";
|
||||
|
||||
const timeText = `${month}/${year}`;
|
||||
const timeText = `${(month + 1).toString().padStart(2, "0")}/${year}`;
|
||||
const { actualBoundingBoxRight: width } = ctx.measureText(timeText);
|
||||
|
||||
ctx.fillText(
|
||||
|
||||
Reference in New Issue
Block a user