Skip to content

Support for Hijri or Jalali or other international calendar in datepicker #2519

Closed

Description

@araselahi

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.

Activity

  1. fxck commented on Jan 4, 2017

    @fxck
    Contributor

    There's no datepicker in material2. $mdDateLocale sounds like material. You are probably in a wrong repo.

  2. araselahi commented on Jan 4, 2017

    @araselahi
    Author

    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.

  3. 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
  4. fxck commented on Jan 4, 2017

    @fxck
    Contributor

    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.

  5. araselahi commented on Jan 4, 2017

    @araselahi
    Author

    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.

  6. jelbourn commented on Jan 27, 2017

    @jelbourn
    Contributor

    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.

  7. araselahi commented on Jan 27, 2017

    @araselahi
    Author

    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.

  8. mmalerba commented on Jan 27, 2017

    @mmalerba
    Contributor

    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.

  9. araselahi commented on Jan 27, 2017

    @araselahi
    Author

    of course, it would be my pleasure.

  10. mmalerba commented on Feb 3, 2017

    @mmalerba
    Contributor
  11. araselahi commented on Feb 4, 2017

    @araselahi
    Author

    I have just seen the notification in my email. I will get back to you soon.

  12. araselahi commented on Feb 4, 2017

    @araselahi
    Author

    @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?

  13. added
    feature
    on Apr 11, 2017
  14. 25 remaining items

  15. tobiasschweizer commented on Dec 14, 2017

    @tobiasschweizer
    Contributor

    @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.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.

  16. mmalerba commented on Dec 14, 2017

    @mmalerba
    Contributor

    @tobiasschweizer I can set up some time to do a Hangouts conversation if you like. Shoot me an email: mmalerba@google.com

  17. tobiasschweizer commented on Mar 24, 2018

    @tobiasschweizer
    Contributor

    @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.

  18. tobiasschweizer commented on Mar 24, 2018

    @tobiasschweizer
    Contributor

    I think it is already there angular/material-builds@d6e71c9

  19. tobiasschweizer commented on Aug 21, 2019

    @tobiasschweizer
    Contributor

    @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:

    Islamic_Date

    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?

  20. tobiasschweizer commented on Aug 21, 2019

    @tobiasschweizer
    Contributor

    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

  21. added
    needs: discussion
    and removed on Mar 3, 2020
  22. jelbourn commented on Jan 12, 2021

    @jelbourn
    Contributor

    (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.

  23. tobiasschweizer commented on Jan 14, 2021

    @tobiasschweizer
    Contributor

    (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.

    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.

  24. jelbourn commented on Jan 14, 2021

    @jelbourn
    Contributor

    @tobiasschweizer it's something I'd like to explore eventually, but I don't see us dedicating any time to it in 2021

  25. angular-automatic-lock-bot commented on Feb 14, 2021

    @angular-automatic-lock-bot

    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.

  26. locked and limited conversation to collaborators on Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P5area: material/datepickerfeaturehelp wantedneeds: discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions