In my attendance portal, Employee can select Date, Check In and Check Out through datetime picker. Datatype of 'Check In' and 'Check out' is "string". So in edit mode, datetime picker is not working and I'm get error of "getDate and getTime is not a function". I've also changed the datatype of Checkin and CheckOut to DateTime but then with time, date is also storing in database which i don't want to. So kindly please help me that how to solve this issue.
Here's my View Code
- class="col-md-3">
- @*class="form-control" type="text" readonly />*@
- @Html.TextBoxFor(model => model.Date, "{0:dd/MM/yyyy}", new { @class = "form-control datepicker", autocomplete = "off" })
- "hidden" id="dtp_input2" value="" />
- class="col-md-3">class="input-group date form_time" data-date="" data-date-format="hh:ii" data-link-field="dtp_input1" data-link-format="hh:ii">
- @Html.TextBoxFor(model => model.CheckIn, "{0:hh:mm}" , new { @class = "form-control", autocomplete = "off" })
- class="input-group-addon">class="glyphicon glyphicon-remove">
- class="input-group-addon">class="glyphicon glyphicon-time">
- "hidden" id="dtp_input1" value="" />
- class="col-md-3">class="input-group date form_time" data-date="" data-date-format="hh:ii" data-link-field="dtp_input3" data-link-format="hh:ii">
- @Html.TextBoxFor(model => model.CheckOut, "{0:hh:mm}" , new { @class = "form-control", autocomplete = "off" })
- class="input-group-addon">class="glyphicon glyphicon-remove">
- class="input-group-addon">class="glyphicon glyphicon-time">
- "hidden" id="dtp_input3" value="" />
- class="col-md-3">
- @Html.TextBoxFor(model => model.ShortLeave, new { @class = "form-control", Type = "decimal" , autocomplete = "off" })
Sachin SinghPosted Nov 25, 2020, 12:52 AM