rajeshwarpatlolla/ionic-timepicker

12:00 AM shown as 00:00 AM

shyamal890 opened this issue · 7 comments

12:00 AM shown as 00:00 AM

Yes I have the same issue. When setting the input time to 0 it shows up as 00:00 AM and if I set it to 86400, 24_60_60, it shows up as 12:00 PM. Is there a different way to set it to midnight?

paste this in line 117 (ionic-timepicker.provider.js)

if (config.format==12 && $scope.time.hours =='00'){
$scope.time.hours=12;
}

<script src="lib/ionic-datepicker/ionic-datepicker.bundle.min.js"></script>
<script src="lib/ionic-timepicker/ionic-timepicker.provider.js"></script>
<script src="lib/ionic-timepicker/ionic-timepicker.module.js"></script>
<link href="lib/ionic-timepicker/ionic-timepicker.styles.css" rel="stylesheet" />

@rajeshwarpatlolla Can you merge this solution please. Thanks

this is not right. it should be 00. now if I put inputTime to 0 I get 12 for the hours. then if I do nothing and press set the time it changes my time to 12pm :O
and also because of that u cant use it for duration any more cause 0 duration translates to 12 hours!
please retract this update.