jalaali / moment-jalaali

A Jalaali (Jalali, Persian, Khorshidi, Shamsi) calendar system plugin for moment.js.
MIT License
936 stars 162 forks source link

Integrate with Endosan's bootstrap datetimepicker #75

Closed Mo3ta9em93 closed 7 years ago

Mo3ta9em93 commented 7 years ago

Please take a look at Eonasdan's bootstrap datetimepicker here it uses moment with locales is there any way i can implement moment-jalaali with it the page freezes whenever i call the datepicker thank you very much

behrang commented 7 years ago

Unfortunately, this is not easy. Jalaali is not a locale, it is a calendar system and in moment-jalaali you can use both calendar system concurrently. As a result, that date picker needs substantial change to work with moment-jalaali. In #31 we tried to make this easier but we failed. I encourage you to help here.

fingerpich commented 7 years ago

You could use this fork and following code to use Jalali system instead of Gregorian

moment.useJalaliSystemPrimarily();
moment().format('YYYY/MMMM/D'); // 1396/Tir/4
alitaheri commented 7 years ago

Thanks @fingerpich 👍

heidarymr commented 5 years ago

You could use this fork and following code to use Jalali system instead of Gregorian

moment.useJalaliSystemPrimarily();
moment().format('YYYY/MMMM/D'); // 1396/Tir/4

not work!