I have a datetimepicker and a button. The user selects a date time, then hit the button. The selected date time is shown in an alert.
https://jsfiddle.net/jeffxiao/rfzm8pyt/
$(function() {
$('#datetimepicker1').datetimepicker();
$('#buttonGo').click(function() {
var moment = $("#datetimepicker1").datetimepicker("date");
alert(moment.format('MMMM Do YYYY, h:mm:ss a'));
})
});
The question is, if the user changes the text for the input, instead of choosing from datetimepicker, is there a way to retrieve the updated datetime (in the text)?
My test shows the default is to retrieve the selected in the picker, NOT the updated text in the text box.