Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update datetime in datetimepicker after setting mindate #125

Open
rajausman opened this issue Nov 15, 2019 · 0 comments
Open

Unable to update datetime in datetimepicker after setting mindate #125

rajausman opened this issue Nov 15, 2019 · 0 comments

Comments

@rajausman
Copy link

I have following Code:
// intialization
$('#datetimepicker2').datetimepicker({
minDate: moment().millisecond(0).second(0).minute(0).hour(0),
format: 'YYYY/MM/DD HH:mm A',

});

I have use minDate = 0 ,minDate=new Date(), minDate=moment() but didn't work :(
// update case when trigger Edit Button
function ChangeFormat(dates) {

var newDate = moment.utc(dates).local().format();
newDate = moment(newDate).format('YYYY/MM/DD  HH:mm A');
return newDate;

};
var date = ChangeFormat(UTCDateTime);

$('#datetimepicker2').data("DateTimePicker").date(date);

$("#updateSchedulemodal").modal('show');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant