Home » Unsolved » What Time is It?

What Time is It?

So, the past couple days have been spiking and time boxing some changes to our app based on feedback earlier this week from our end users. One piece of feedback was that one person wanted the ability to type in the time for the date-time-picker instead of using the pop-over and having to click the up-down arrows to select the correct time. A very reasonable request! So, we removed the time selector from the popover, leaving the calendar portion and went on to use the new-ish HTML5 input type: time. It’s pretty cool! Pass in a date to the ng-model (we are using angular) and the input field defaults to the current time with tab (or Left-Right arrow) selectable fields. HOWEVER….Chrome defaults to a 12-hour format, Opera to a 24-hour format, Safari…who knows. And it seems like there is no way to prefer one format over the other and the persons that will be using this part of the app always use 24-hour time! So, what was going a relatively easy fix will now take some more work of setting up two different input fields of type: number, restricting the input to the appropriate ranges for hours/minutes and then using the fields to build a date string along with the date-time-picker. Oh well…if anyone has any ideas how to force a 24-hour format for  <input type=”time”> any help would be appreciated!!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s