Closed springcode closed 6 years ago
I had to set the 'timeSeparator' property in order to make it work.
$('.timepicker-24-hr').wickedpicker({ twentyFour: true, timeSeparator: ':' });
original : ---» timeSeparator: ' : ', // The string to put in between hours and minutes (and seconds) change to : --» timeSeparator: ':', // The string to put in between hours and minutes (and seconds)
i face the same problem me be i will change to another time picker or i have to edit the date before save and save it into 24 hours
i make this php function to solve 24 hours problem
function date24($date){
$sDate = explode(" ",$date);
if($sDate['3'] == "AM"){
return $sDate['0'].":".$sDate['2'];
}else if($sDate['3'] == "PM"){
return ($sDate['0'] + 12).":".$sDate['2'];
}
}
hope this help some one
I have temporarily fixed this by checking the format in the showPicker: method (line 113) and not using the regex when splitting if it is in 24 hour format. This works ok for me but is just a sticking plaster as it may affect other functionality?