calendar customization

2 posts, 1 answers
  1. Jessy
    Jessy avatar
    1 posts
    Member since:
    Jun 2016

    Posted 29 Jun Link to this post

    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. 





  2. Answer
    Stefan avatar
    195 posts

    Posted 04 Jul Link to this post

    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.

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

    Let me know if you need additional assistance.

    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top