I have this function:
CODE JS:
function addEditEvent(state, event, start, end) {
if (state == "select") {
$('#myModal').modal('show');
var completeD = start.format("YYYY/MM/DD H:mm");
var dt = new Date(completeD);
$("#time").val(dt);
//some code JS
}
}
after running this code I get the following format:
Tue Feb 09 2016 10:30:00 GMT+0200 (EET)
I just want to keep here time and remain so
10:30:00
how to do so to stay that way? It can easily change the date format and remain only time?
EDIT:
var completeD = start.format("HH:mm:ss");
var dt = new Date(completeD);
$("#time").val(dt);
Unfortunately I get this error message "invalid data"