You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is a bug, when you inject MAT_DATE_LOCALE by 'fa' value, the datepicker calendar shows incorrect days for each month. incorrect means exactly each day number is added by 3. so if today is 5th day of month, calendar shows 8 and if tomorrow is 6th day of month, calendar shows 9.
and if you select today which calendar show as 8, the correct number placed in date input. that means 5 is placed in date input .
What is the expected behavior?
the expected behavior is calendar must show every day number minus 3.
What is the current behavior?
the current behavior is calendar add 3 to each day number. that mean today is 5th day of month but calendar shows 8. and when you select 8, in date input correct day number (5) is placed.
What are the steps to reproduce?
just put
{
provide: MAT_DATE_LOCALE,
useValue: 'fa-IR'
}
in app module providers and if you know jalali or persian calendar, you can see the bug
and if you don't know this calendar, just select one day in calendar and you see the selected date day number in input is 3 less than day selected in calendar. the input is correct and the calendar is incorrect.
What is the use-case or motivation for changing an existing behavior?
it's a jalali calendar. the most accurate solar calendar in world and used by four and more country in the world.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
i test it with angular 6.0.2 and material 6.0.2 and material 6.4.7. and both of them had that bug
Is there anything else we should know?
if anyone help what code show's days in calendar , i can solve it.
The text was updated successfully, but these errors were encountered:
i think the bug is because the calendar shows the number of days for gregorian month,
that means some jalali month is 31 day's, some 30 day's and one 29 day's. and calendar shows day's for gregorian month that means if the jalali month is 31 day's and gregorian month is 30 day's that bug occur.
but when you select the day, the selected date is correct
Yes, out of the box we only support Gregorian, though I have seen people post that they've been able to create adapters for the Jalali calendar. See #5972 and #2519
Bug, feature request, or proposal:
this is a bug, when you inject MAT_DATE_LOCALE by 'fa' value, the datepicker calendar shows incorrect days for each month. incorrect means exactly each day number is added by 3. so if today is 5th day of month, calendar shows 8 and if tomorrow is 6th day of month, calendar shows 9.
and if you select today which calendar show as 8, the correct number placed in date input. that means 5 is placed in date input .
What is the expected behavior?
the expected behavior is calendar must show every day number minus 3.
What is the current behavior?
the current behavior is calendar add 3 to each day number. that mean today is 5th day of month but calendar shows 8. and when you select 8, in date input correct day number (5) is placed.
What are the steps to reproduce?
just put
{
provide: MAT_DATE_LOCALE,
useValue: 'fa-IR'
}
in app module providers and if you know jalali or persian calendar, you can see the bug
and if you don't know this calendar, just select one day in calendar and you see the selected date day number in input is 3 less than day selected in calendar. the input is correct and the calendar is incorrect.
What is the use-case or motivation for changing an existing behavior?
it's a jalali calendar. the most accurate solar calendar in world and used by four and more country in the world.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
i test it with angular 6.0.2 and material 6.0.2 and material 6.4.7. and both of them had that bug
Is there anything else we should know?
if anyone help what code show's days in calendar , i can solve it.
The text was updated successfully, but these errors were encountered: