This is a migrated thread and some comments may be shown as answers.

Scheduler - Set the date format of recurrenceRule's datepicker

2 Answers 128 Views
This is a migrated thread and some comments may be shown as answers.
VB
Top achievements
Rank 1
Veteran
Iron
VB asked on 21 Apr 2021, 05:02 PM

Hello,

I have a problem with the datePicker of recurrenceRule.

As you can see in the picture, the datetimepicker of "start" uses a custom date format as dd/MM/yyyy and the culture "fr-BE". 

If I understand correctly how the datepicker of recurrence rule works, this one picks the date of "start". But the problem is the datepicker doesn't understand the custom format so it shows me an error 

Uncaught TypeError: Cannot read property 'getFullYear' of null

If I delete the custom format and the culture, all works perfectly but if I set a custom format it doesn't work.

Is there a solution to set globally the format of a date ? or how can I set a custom date format to the datepicker of recurrence rule ?

 

Thank you for the help.

2 Answers, 1 is accepted

Sort by
0
VB
Top achievements
Rank 1
Veteran
Iron
answered on 22 Apr 2021, 10:33 AM

I found the very simple solution.

I imported the correct culture but never used it. Once I set "kendo.culture("fr-be")", the correct format appeared.

Moreover, I made some changement in kendo.culture.fr-BE.js to display the full year.

 

So I have another question, is it possible to edit the culture.fr-BE.js file to add some information ? For example in the picture, some information is in english and I would like to translate in french.

0
Accepted
Petar
Telerik team
answered on 22 Apr 2021, 11:02 AM

Hi VB,

I am happy to hear that you've managed to resolve the issue. Thank you for sharing it with the community. 

The editing and development of the messages and culture files is a community-driven task. If you want to suggest changes that will be applied in the files available via CDN, you can go to this repository: https://github.com/telerik/kendo-ui-core/tree/master/src

  1. Fork the repository.
  2. Apply the respective changes.
  3. Submit a pull request.

In the messages and cultures folders, you will find all available message and culture files. 

The other approach I can suggest is to download the files that you use in your project. Reference these files locally in your project. Apply the desired changes in the local files.

I hope the above answers your question.  

Regards,
Petar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Asked by
VB
Top achievements
Rank 1
Veteran
Iron
Answers by
VB
Top achievements
Rank 1
Veteran
Iron
Petar
Telerik team
Share this question
or