eclipsesource / jsonforms

Customizable JSON Schema-based forms with React, Angular and Vue support out of the box.
http://jsonforms.io
Other
2.11k stars 358 forks source link

Jalali Datepicker #2024

Open vahidid opened 1 year ago

vahidid commented 1 year ago

Is your feature request related to a problem? Please describe.

Date and DateTime picker in jsonforms have a static LocazitationProvider with dayjs adapter. I want to use Jalali (persian) date picker.

Describe the solution you'd like

It can be dynamic and pass through props to the main component.

Describe alternatives you've considered

I don't know any alternative.

Framework

React

RendererSet

Material

Additional context

Sorry for my bad English.

sdirix commented 1 year ago

Hi @vahidid, does dayjs-jalali cover your needs?

vahidid commented 1 year ago

Hi @vahidid, does dayjs-jalali cover your needs?

Hi again, No it doesn't. LocazitationProvider in date picker renderer has a static adapter and i can't change it with any options.

sdirix commented 1 year ago

When using dayjs-jalali can't you switch the global dayjs locale via dayjs.locale('fa')? That is the only way it works for other locales at the moment too.