0

I am using jquery date time picket plugin. The problem i am facing is that, the time value is on set when datetimepicker is opened.

In my case I preset the value of input fields via jsp and then invoke the datetimepicker on that field. When the datetimepicker is opened, i can see the value of date being set but not of time. time value is defaulted to 000000.

here is my config :

$(".timepicker").datetimepicker({
    dateFormat: 'yymmddHHmmss',
    separator: '',
    timeFormat: 'HHmmss',
    onClose: function(){
        //$("#filtersForm").submit();
    }
});

This is the error I get in the console :

Error parsing the date/time string: Unexpected literal at position 8
date/time string = 20160312155741
timeFormat = HHmmss
dateFormat = yymmddHHmmss

Please help with this.

Rachit Agrawal
  • 685
  • 4
  • 13
  • 35

0 Answers0