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.