0
Under review

datepicker returns 24:14 for the hour instead of 00:14

sstava 6 years ago updated 6 years ago 2
This issue seems a little strange, but I will share it all the same.

The following code snippets are from my app. I have a datepicker that is setup to only show the time. When I get the info from the datepicker all works well UNLESS it is between 12am and 1am. Instead of returning 00 for the hour it returns 24. This is an invalid time.

Not sure that I could make this happen with my code, but I am open to any ideas.

<datepicker name="selectdate" alias="ADDTIMESLOTCONTROL" width="100%" height="100%" time="only" borderwidth="1" bordercolor="777777" cornerradius="5"></datepicker>

<assign property="var:tempDateTime" value="[object:ADDTIMESLOTCONTROL.date]" />

Under review
Let me see what I can find out. I know the format of "2014-05-08 24:15:17" is accepted in the current 24 format, but I am sure there is some sort of js you can do to swap that out. It will likely mean that you will need to read it as epoch or something and spit it back out in your desired format. If you only want time to display can you use the [object:ADDTIMESLOTCONTROL.time] instead? It returns in 12Hr format "12:15 AM"
+1
Thanks for the quick response! I took care of changing the data when I ran across the problem. I used the javascript replace() function and replaced ' 24' with ' 00'.

I was just sharing what I found in case it was a bug (or if someone else ran into the same problem)