Datetimepicker considering day as month

0

I have an inputText that I created for date, it is initially populated with a DateTime of my Model that is populated:

@Html.TextBoxFor(model => model.Data, "{0:dd/MM/yyyy}", new { @class = "form-control input-md", @id = "datetimepickerDataFato" })

And my javascript from datetimepicker

$(document).ready(function () {
  $('#datetimepickerDataFato').datetimepicker({
     locale: 'pt-br',
     format: 'DD/MM/YYYY',
     allowInputToggle: true,
     maxDate: Date.now()
  });
});

My problem is that when this datetimepicker javascript code is read, it overrides my date for today, and still considers the day to be a month, that is, I can not put any day that is greater than 12.

    
asked by anonymous 15.12.2016 / 12:28

1 answer

0

Try using the following format: 'dd / MM / yyyy' in your javascript.

    
15.12.2016 / 13:56