Bootstrap 3 Datetimepicker 3.0.0 - make a week start on Monday

后端 未结 9 1160
广开言路
广开言路 2020-12-06 10:28

There are few reasons I use Bootstrap 3 Datetimepicker 3.0.0 in my MVC 5 project.

Any idea how to offset week start so it starts from Monday? Language tag also not w

9条回答
  •  广开言路
    2020-12-06 10:52

    Instead of using moment.js I used moment-with-langs.js (I guess it came with default package ASP.NET MVC 5).

    By calling:

    
    

    thing works, finally the calender starts from monday.

    UPDATE: Even better, add key to web.config

        
        
    
    

    and then

    $(document).ready(function () {
        $(document).on('focus', '#Date', function () {
            $(this).datetimepicker({
                locale: '@System.Configuration.ConfigurationManager.AppSettings["Culture"]',
                format: 'DD:MM:YYYY',
            });
        });
    });
    

提交回复
热议问题