camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.51k stars 484 forks source link

Jalali calendar support for form date-time element #4308

Open okaeiz opened 6 months ago

okaeiz commented 6 months ago

Problem you would like to solve

Since Camunda is becoming the first choice for business process management, and we are located in a region where the main calendar is Jalali (not Gregorian), including date-time elements in our forms requires our users to take a considerable time converting these dates. Although this can be handled by using middleware scripts in database transactions or other use cases, it is not worth the effort. It takes time and energy. It'd be great if date-time element had an option to change the calendar when needed.

Proposed solution

I guess the easiest way of implementation is to add an option to the date-time properties panel using which the users can switch the calendar between Jalali and Gregorian.

Alternatives considered

Another option would be to set this preference in the form properties panel. There's another FR which proposes the support for right-to-left languages and it seemed like a good idea to implement this option in the form properties, rather than for each element separately. Therefore, the date settings may be implemented there as well.

Additional context

I'd be glad if I could contribute in i18n and localization (string translation and visual improvements).

okaeiz commented 5 months ago

I'd be grateful if you guys keep me informed of this issue. It's of high importance for my organization.

nikku commented 5 months ago

@okaeiz Consider to contribute if this is important for your organization.

okaeiz commented 5 months ago

@okaeiz Consider to contribute if this is important for your organization.

Could you please tell me where I can find the codes related to the components' definition? I checked everything under camunda-modeler/client/src/app/tabs /form but I found nothing. I want to start working on a new calendar component.

nikku commented 5 months ago

@okaeiz We use form-js as a foundation and I'd ask you to contribute there.

okaeiz commented 3 weeks ago

I have created this Jalali Calendar custom component:

https://github.com/user-attachments/assets/b8b8c77e-b4b3-471c-a872-3c6d97b84f5b

Is it worth creating a PR in form-js?

barmac commented 3 weeks ago

Please feel free to open a PR to https://github.com/bpmn-io/form-js so that the team can evaluate it.

okaeiz commented 3 weeks ago

Since there already exists a datepicker, is it okay to add another datepicker or we should modify the existing one?

barmac commented 3 weeks ago

@nikku and I have reached out to the form-js team internally, so you will get an answer soon.