0

This is my datetimepicker

$('input.bsdatepicker2').datetimepicker({  
        format: 'mm/dd/yyyy hh:ii',
        startDate: '+0d',
    });

How to set the datetimepicker date format to the computer's regional settings, whatever they are. I'm passing this date as a JSON and later converting it in c# and its causing me problems.

Georgi93
  • 47
  • 1
  • 8
  • There's no standard way to determine the date format preferences of the host. – RobG May 14 '16 at 09:42
  • Oh yeah. Now i got it. The problem was that my PC regional settings are set as dd/MM/yyyy and I'm running my project in local host. That means the project expects the same date input but my datepicker is passing the date format like MM/dd/yyyy and since we are 14-th May my C# code tries to interpreted as 05.14.2016 and since there is no 14-th Month in the calendar im getting an error! – Georgi93 May 14 '16 at 12:33

0 Answers0