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

calendar customization

4 Answers 564 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jessy
Top achievements
Rank 1
Jessy asked on 30 Jun 2016, 03:42 AM

Hi, i am currently using kendo calendar control in my application i wanted to use multi-language for numbers and date formats and all other options in en-GB. I am currently using the code below to override the culture it works fine. 

var customCulture = $.extend({}, kendo.culture(), {
                name: "custom-culture",
                calendars: {
                    standard: {
                        days: {
                            names: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
                            namesAbbr: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
                            namesShort: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]
                        },
                        months: {
                            names: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
                            namesAbbr: ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"]
                        },
                        patterns: {
                            d: "dd/MM/yyyy",
                            D: "dd MMMM yyyy",
                            F: "dd MMMM yyyy HH:mm:ss",
                            g: "dd/MM/yyyy HH:mm",
                            G: "dd/MM/yyyy HH:mm:ss",
                            m: "d MMMM",
                            M: "d MMMM",
                            s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
                            t: "HH:mm",
                            T: "HH:mm:ss",
                            u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
                            y: "MMMM yyyy",
                            Y: "MMMM yyyy"
                        },
                        firstDay: 1
                    }
                }
            });

 

But the problem is i don't want to change the patterns setting from the clients culture i need to remove this from being over ridden. If i remove this patterns code piece it all stop working. Is there any way to do this ?? 

 

Thanks a lot in advise. 

 

 

 

 

4 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 04 Jul 2016, 11:47 AM
Hello Jessy,

The jQuery extend() method can be used to override a specific part of the kendo.culture method by setting its deep argument to true.

https://api.jquery.com/jquery.extend/#jQuery-extend-deep-target-object1-objectN

I made an example based on your scenario to demonstrate the desired behaviour:

http://dojo.telerik.com/eyiYe

Let me know if you need additional assistance.

Regards,
Stefan
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Marc
Top achievements
Rank 1
answered on 23 Nov 2018, 05:26 PM

Hi 

 

Would it be possible to  specify the calendars.standard.days option on a kendoCalendar.

 

Regards

Marc

0
Alex Hajigeorgieva
Telerik team
answered on 27 Nov 2018, 01:49 PM
Hi, Marc,

It is possible to customize the available cultures - any aspect of them as Stefan demonstrated.

You can see the full definition here:

https://docs.telerik.com/kendo-ui/framework/globalization/definecultureinfo#customization

If you wish to declare your own culture with different day names, you can do that in the same way - just provide the custom values of the days in the expected format and the Kendo UI Calendar will start using them. Here is a runnable example which uses names of the days "First", "Second", "Third", etc.

https://dojo.telerik.com/@bubblemaster/uvOGagiP

Let me know in case further assistance is necessary.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sayali
Top achievements
Rank 1
Iron
answered on 06 Mar 2025, 12:49 PM

Hello,
In kendo UI Nepali calendar implementation is possible? Any library or JS file is present in current Framework?
For different countries any calendar specific library is their kindly help us on customized calendar functionality? 

Neli
Telerik team
commented on 10 Mar 2025, 08:11 AM

Hi Sayali,

I am not sure I understand the question correctly.

- If your questions is if a Nepal culture is supported in the Kendo UI calendar, I would suggest reviewing and loading the kendo.culture.ne.js file:

https://github.com/telerik/kendo-ui-core/blob/master/src/cultures/kendo.culture.ne.js 

However, if your questions is related to a specific UI design please send us more information, so I can get a better udnerstanding of the requirement and provide further assistance.

Looking forward to your reply.

Regards,

Neli

Tags
Calendar
Asked by
Jessy
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Marc
Top achievements
Rank 1
Alex Hajigeorgieva
Telerik team
Sayali
Top achievements
Rank 1
Iron
Share this question
or