Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

datepicker: support for Hijri or Jalali or other international calendar in datepicker #10211

Closed
araselahi opened this issue Jan 4, 2017 · 5 comments
Labels
resolution: won't fix There are no resources to fix this issue, the priority is too low, or it doesn't align w/ MD spec.

Comments

@araselahi
Copy link

araselahi commented Jan 4, 2017

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.

@araselahi
Copy link
Author

araselahi commented Aug 6, 2018

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

@Splaktar Splaktar added the resolution: won't fix There are no resources to fix this issue, the priority is too low, or it doesn't align w/ MD spec. label Aug 9, 2018
@Splaktar
Copy link
Member

Splaktar commented Aug 9, 2018

It looks like there is some support for this in Angular Material. We don't have the resources to investigate or support this in AngularJS Material.

@Splaktar Splaktar changed the title Support for Hijri or Jalali or other international calendar in datepicker datepicker: support for Hijri or Jalali or other international calendar in datepicker Aug 9, 2018
@kasun90
Copy link

kasun90 commented Jan 23, 2020

Can you please direct me to the api where we can input a custom calendar?

@araselahi
Copy link
Author

araselahi commented Jan 28, 2020

@kasun90 it is in the Angular Material library not in AngularJS Material:

@Batoul-Ammar
Copy link

It was surprisingly supported by angular material since they support localization you can find that on their documentation
datepicker-locale

The only issue I have faced is that I have to discover the right local to generate Hijri dates 'ar-sa'

this._adapter.setLocale('ar-sa');

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: won't fix There are no resources to fix this issue, the priority is too low, or it doesn't align w/ MD spec.
Projects
None yet
Development

No branches or pull requests

4 participants