Have a good day. I'm searching the way to set date from edit view in my app and only shows the current date.
I'm using bootstrap datetimepicker like this:
$('.datepicker').datetimepicker(
{
format: 'DD/MM/YYYY',
locale: 'es',
icons: {
time: "fas fa-clock",
date: "fas fa-calendar-alt",
up: "fas fa-arrow-up",
down: "fas fa-arrow-down",
previous: "fas fa-chevron-left",
next: "fas fa-chevron-right"
},
defaultDate: null,
daysOfWeekDisabled: [0, 6]
});
and in my form I've implemented as:
@Html.EditorFor(model => model.ApplyDate, new { htmlAttributes = new { @class = "form-control datepicker", placeholder = "dd/mm/yyyy", tabindex = "5", maxlength = "10", required = "", @Value = Model.ApplyDate } })
but not getting any good results. Only current date is set.
Thanks.