Open aghili371 opened 5 years ago
Please screen shoot
I think he's talking about the picker itself. When you edit a content item.
Yep, but I'm not sure if it's built with bootstrap, because this is something different if I'm not wrong
@sebastienros is the component using bootstrap or jquery-ui or native one?
i can't make screen shoot. when you want to select date , it doesn't show Persian calendar.
maybe there is a default in-browser editor we could use as a custom editor.
That's a default browser editor we use custom one that support localization for instance jquery ui datepicker supports many languages including Arabic, Farsi .. etc
Looks good to use the jquery one then, ideally as a custom editor at first.
This will need the following:
OrchardCore.Resources
DateField
which may I need your help on this, because I didn't work with the editors yetFYI there 're two options for datetime picker localization script: 1- Script per language which is better in term of Perf 2- Scripts for all the supported languages (which is the preferred option for us)
After little investigation seems jquery-ui support datetime localization only. BTW I found another cool library that supports localization & calendars too but it needs more investigation, so for that I'm suggesting the following:
1- Add jQuery-UI date picker as a custom editor as @sebastienros mentioned before 2- Integrate the new date picker, with specifying the calendar and language as settings (which will fix #3664) 3- Mapping the date picker calendars with the one that we already have and support
FYI: the priority for step 1, other step may added in 1.1.0 as improvements, but if we have time we can do it in 1.0.0
@aghili371 the PR #3707 added a localized version of datetime picker, @sebastienros can we make this open until we finish other steps, or shall we make the improvements after 1.0.0
milestone?
it still doesn't work.
@aghili371 the localized date-picker should should the name of the Persian days, months and years if the culture set to fa-IR
, don't confuse with Persian calendar which is still not integrated with the date-picker
Create a SiteSettingsCalendarSelector that would override the DefaultCalendarSelector that uses the calendar that comes from the current culture.
That SiteSettingsCalendarSelector would return a calendar type that has been saved in the SiteSettings.
As we discussed in gitter, if date picker should uses the SiteSettingsCalendarSelector
unless overriding need. For instance if the SiteSettingsCalendarSelector
provides GregorianCalendar
, may I will override that and use HijriCalendar
for specific date pickers
I see online that there are different date pickers based on the calendar. Maybe we should have an international date picker that can adapt to the current culture, or/and provide custom editor for the date field that lets us select which picker to use. In the end the date would still be stored with a DateTime value.
@sebastienros can reschedule the enhancements that I mentioned in my comment https://github.com/OrchardCMS/OrchardCore/issues/3635#issuecomment-496006787 to target 1.1
it doesn't show the Persian calendar for the date field. i have enabled localization and i added fa-ir culture too.