I need help ! My problem is that i have two textbox in which we have initial two dates. If user change the date from daterangepicker then end date should be end of that month.
For Ex : startdate is 07-09-2017 then end date should be 30-09-2017
if use change date like 01-10-2017 then end date should be 31-10-2017
i am using Bootstrap Daterangepicker and moment.js.
Help will highly appriciated...
Model Class
public datetime StartDate(get;set;)
public datetime EndDate(get;set;)
View
@html.EditiorFor(m=>m.Startdate)
@html.EditiorFor(m=>m.Enddate)
Script
$('#Startdate').daterangepicker({
singledatepicker=true,
locale:{Format : "dd-mm-yyyy"}
});
$('#Enddate').daterangepicker({
singledatepicker=true,
locale:{Format : "dd-mm-yyyy"}
});