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
{{ message }}
Repository navigation
Support for Hijri or Jalali or other international calendar in datepicker #2519
P5The team acknowledges the request but does not plan to address it, it remains open for discussionarea: material/datepickerfeatureLabel used to distinguish feature request from other issueshelp wantedLabel noting an issue which the team is looking for contribution from the community to fixneeds: discussionFurther discussion with the team is needed before proceeding
I think making dateUtil.js injectable, would provide calendar support functionality for Hijri or Jalali or other international calendars in datepicker. Adding fromGregorian and toGregorian date functions to $mdDateLocale service may provide more abstract solution. These functions could be consequently used in dateUtil.js to provide localized date calculation. Currently $mdDateLocale just provide messages, formatters, and parsers for date internationalization but not date conversion.
I volunteer to produce dateUtil or $mdDateLocale for Hijri or Jalali. Please help me how.
Reacted by Mehdi Saeedifar, mohammad khoeini, Abdelmn3m mohamed, Sajjad Servatjoo, Mr. Happiness, Mohammad, Mostafa Movahedi, KhalilTN, huy-iwa and Alireza Zerafati
I just saw datepicker on material2 feature status: https://github.com/angular/material2#feature-status
thought that it would inherit the same functionality from material. Hope you take internationalization date conversion into account for new datepicker. We all love material(2) and your great project.
changed the title [-]Supporting Hijri or Jalali or other international calendars in datepicker would be great.[/-][+]Support for Hijri or Jalali or other international calendar in datepicker[/+]on Jan 4, 2017
The problem with datepicker, as mentioned in its issue, is that there are no specs(for desktop version anyway) in material design for it.. so until google designers create those, there won't be no official date/timepicker implementation. Sadly.
But I'm pretty sure that once the spec is done, internationalization will be taken into account.
Internationalization date conversion may not affect visual design of datepicker. It just refer to how cells arrange according to the native calendar rules, mainly the same functions as currently exist in dateUtil, but with native alternative principals. About the visual customization, task already has been done gracefully in $mdDateLocale.
We're designing the datepicker now. We likely will only be able to support the Gregorian calendar in the initial version, but it's worth thinking about in the design.
At the moment it may not important to support any special native calendar. The important point about this feature is to make the logic of date conversion 'injectable'. Then every folk will know how to implement their native conversion logic providers. Although I had some suggestions above, but as a designer, you know better how to construct the structure. Thanks Jeremy, for taking it into account and for your grate project.
I'll have a design doc to share shortly, it would be great if you could take a look and let me know if you think the design is flexible enough to support this.
@mmalerba 'CalendarLocale injectable' and 'Internationalization' sections currently include the definition only about the word translation and visual parsing and formatting but not other nationality date conversion logic. In other calendars, days calculation completely different from Gregorian. So I guess we need all the logic in dateUtil.js such as getFirstDateOfMonth, getNumberOfDaysInMonth and so on could be replaceable according to the other international calendar to determine how the days to be rendered on date picker. I think with this suggested feature, it would be a magic date picker for other folks. I am not sure the new SimpleDate data type could support other international calendar date because it is still subset of Gregorian calendar date. Am I right?
I am struggling with package.json and the basic structure (index.ts, tsconfig). I would be glad if you could give me a hand here. I guess once I have the basic setup similar to src/material-moment-adapter I should be fine and can implement it by myself.
btw: all the available calendars can also be used individually. In the date adapter, I still have to figure out a way to set the initial calendar correctly, see dhlab-basel/JDNConvertibleCalendarDateAdapter#9
Closing this issue since I don't realistically ever see us prioritizing adding support for non-Gregorian calendars. With the current state of our backlog, it would be years before we would even consider this, and I don't foresee it ever getting near the top of the queue.
Closing this issue since I don't realistically ever see us prioritizing adding support for non-Gregorian calendars. With the current state of our backlog, it would be years before we would even consider this, and I don't foresee it ever getting near the top of the queue.
I understand.
Could you tell me anything about the priority of the precision task (year or month selection)? At the moment, the date and range pickers only allow for day selection.
P5The team acknowledges the request but does not plan to address it, it remains open for discussionarea: material/datepickerfeatureLabel used to distinguish feature request from other issueshelp wantedLabel noting an issue which the team is looking for contribution from the community to fixneeds: discussionFurther discussion with the team is needed before proceeding
Activity
fxck commentedon Jan 4, 2017
There's no datepicker in material2.
$mdDateLocalesounds like material. You are probably in a wrong repo.araselahi commentedon Jan 4, 2017
I just saw datepicker on material2 feature status: https://github.com/angular/material2#feature-status
thought that it would inherit the same functionality from material. Hope you take internationalization date conversion into account for new datepicker. We all love material(2) and your great project.
[-]Supporting Hijri or Jalali or other international calendars in datepicker would be great.[/-][+]Support for Hijri or Jalali or other international calendar in datepicker[/+]fxck commentedon Jan 4, 2017
The problem with datepicker, as mentioned in its issue, is that there are no specs(for desktop version anyway) in material design for it.. so until google designers create those, there won't be no official date/timepicker implementation. Sadly.
But I'm pretty sure that once the spec is done, internationalization will be taken into account.
araselahi commentedon Jan 4, 2017
Internationalization date conversion may not affect visual design of datepicker. It just refer to how cells arrange according to the native calendar rules, mainly the same functions as currently exist in dateUtil, but with native alternative principals. About the visual customization, task already has been done gracefully in $mdDateLocale.
jelbourn commentedon Jan 27, 2017
We're designing the datepicker now. We likely will only be able to support the Gregorian calendar in the initial version, but it's worth thinking about in the design.
araselahi commentedon Jan 27, 2017
At the moment it may not important to support any special native calendar. The important point about this feature is to make the logic of date conversion 'injectable'. Then every folk will know how to implement their native conversion logic providers. Although I had some suggestions above, but as a designer, you know better how to construct the structure. Thanks Jeremy, for taking it into account and for your grate project.
mmalerba commentedon Jan 27, 2017
I'll have a design doc to share shortly, it would be great if you could take a look and let me know if you think the design is flexible enough to support this.
araselahi commentedon Jan 27, 2017
of course, it would be my pleasure.
mmalerba commentedon Feb 3, 2017
@araselahi design doc is now available: https://docs.google.com/document/d/1RwPFESCbSSLMSDqxWo7jg4UUpGJTrXX6p5wYlb9pmNc/preview
araselahi commentedon Feb 4, 2017
I have just seen the notification in my email. I will get back to you soon.
araselahi commentedon Feb 4, 2017
@mmalerba 'CalendarLocale injectable' and 'Internationalization' sections currently include the definition only about the word translation and visual parsing and formatting but not other nationality date conversion logic. In other calendars, days calculation completely different from Gregorian. So I guess we need all the logic in dateUtil.js such as getFirstDateOfMonth, getNumberOfDaysInMonth and so on could be replaceable according to the other international calendar to determine how the days to be rendered on date picker. I think with this suggested feature, it would be a magic date picker for other folks. I am not sure the new SimpleDate data type could support other international calendar date because it is still subset of Gregorian calendar date. Am I right?
25 remaining items
tobiasschweizer commentedon Dec 14, 2017
@mmalerba I created a new branch on my forked repo from angular/material2: https://github.com/dhlab-basel/material2/tree/datepicker-datadapter-jdnconvcal
I am struggling with
package.jsonand the basic structure (index.ts, tsconfig). I would be glad if you could give me a hand here. I guess once I have the basic setup similar tosrc/material-moment-adapterI should be fine and can implement it by myself.mmalerba commentedon Dec 14, 2017
@tobiasschweizer I can set up some time to do a Hangouts conversation if you like. Shoot me an email: mmalerba@google.com
tobiasschweizer commentedon Mar 24, 2018
@mmalerba As soon as a build with our merged PR #9639 is available, I will make a proof of concept in my repo https://github.com/dhlab-basel/JDNConvertibleCalendarDateAdapter with a custom header so that the user can switch between Gregorian and Julian calendar formats. https://github.com/dhlab-basel/JDNConvertibleCalendar will have to be extended too so that more calendar formats are supported in the future.
tobiasschweizer commentedon Mar 24, 2018
I think it is already there angular/material-builds@d6e71c9
tobiasschweizer commentedon Aug 21, 2019
@mmalerba @araselahi
We added support for the Islamic calendar.
See https://stackblitz.com/edit/angular-qapxhn
I set the locale to 'ar', 'en' is used as a fallback for the names of weekdays and months. I think there is still a RTL issue:
Also abbreviations would be nice for transliterations of the Arabic names, see https://github.com/dhlab-basel/JDNConvertibleCalendar/blob/master/src/names.json
Could you give me a hand here?
tobiasschweizer commentedon Aug 21, 2019
btw: all the available calendars can also be used individually. In the date adapter, I still have to figure out a way to set the initial calendar correctly, see dhlab-basel/JDNConvertibleCalendarDateAdapter#9
jelbourn commentedon Jan 12, 2021
(revisiting old feature requests)
Closing this issue since I don't realistically ever see us prioritizing adding support for non-Gregorian calendars. With the current state of our backlog, it would be years before we would even consider this, and I don't foresee it ever getting near the top of the queue.
tobiasschweizer commentedon Jan 14, 2021
I understand.
Could you tell me anything about the priority of the precision task (year or month selection)? At the moment, the date and range pickers only allow for day selection.
jelbourn commentedon Jan 14, 2021
@tobiasschweizer it's something I'd like to explore eventually, but I don't see us dedicating any time to it in 2021
angular-automatic-lock-bot commentedon Feb 14, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.