0
votes

I am using Bootstrap 3 Datepicker to display calendar but it does not display value returned from server even though I can see that value in HTML, I have passed the format same as placeholder which you can see in screenshot.

If I open date time picker and select any date it displays properly.

What could be the reason behind this behavior?

Update:

Found the issue, I was providing minDate option for today's date but server was sending me previous day date & time, hence it was not displaying.

Hope this helps someone.

enter image description here

1

1 Answers

0
votes

How did you get and pass the value?

You could try to set your value to the default value:

<script type="text/javascript">
  var myDateTime = /* get your value here */
  $(function () {
    $('#datetimepickerId').datetimepicker({
      defaultDate: myDateTime
    });
  });
</script>