FirstDay of week for Kendo UI DatePicker for Angular

2 posts, 0 answers
  1. Mike
    Mike avatar
    5 posts
    Member since:
    Oct 2008

    Posted 10 Oct Link to this post

    Hi, 

    how can I set the first day of the week used by the Kendo UI DatePicker in an Angular 2/4 project?

    Thanks,

    Mike

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3725 posts

    Posted 12 Oct Link to this post

    Hello Mike,

    The first day of the week is controlled by the chosen LOCALE_ID. For instance, if the locale is set up to 'en-GB', then the component will display the week from Monday. Here is a simple plunker demo that demonstrates the required configuration:

    http://plnkr.co/edit/tBWDLziqXRrslupopojY?p=preview

    Basically, the required culture should be loaded:

    https://www.telerik.com/kendo-angular-ui/components/internationalization/loading-data/#toc-loading-pre-built-data

    and then the correct LOCALE_ID provider should be defined:

    providers:    [{
        // Set default locale to bg-BG
        provide: LOCALE_ID, useValue: 'en-GB'
    }]

    The component will use the defined LOCALE_ID and will reflect the firstDay configuration as expected.

    Regards,
    Georgi Krustev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top