# Time Picker

**URL:** <https://forum.servoy.com/t/time-picker/1234>\
**Category:** Classic Servoy\
**Created:** [February 10, 2004, 7:07pm UTC](https://forum.servoy.com/t/time-picker/1234 "2004-02-10T19:07:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![DFehrenbach](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@DFehrenbach](https://forum.servoy.com/u/DFehrenbach)\
**Post date:** [February 10, 2004, 7:07pm UTC](https://forum.servoy.com/t/time-picker/1234/1 "2004-02-10T19:07:26Z")

</div>

Does anyone know of a bean or plug-in that will include a time picker with a calendar? I need a simple method for entering dates and times.

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [February 10, 2004, 7:37pm UTC](https://forum.servoy.com/t/time-picker/1234/2 "2004-02-10T19:37:32Z")

</div>

I have searched the web intensively for spinners that we can use. At least I didn’t like it.

Servoy put my request for a data and/or time spinner on the list.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [February 10, 2004, 8:57pm UTC](https://forum.servoy.com/t/time-picker/1234/3 "2004-02-10T20:57:33Z")

</div>

if you have a time portion in the format of the calendar field 2.0RC5 will now add a textfield for the time portion so that you can edit the time..

For now it is a simple edit field.. It is not as fancy yet as the time chooser of the windows clock (that you can spin through hour:minute fields..  
This will improve in the further..

---

<div class="post-metadata">

**Author:** ![DFehrenbach](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@DFehrenbach](https://forum.servoy.com/u/DFehrenbach)\
**Post date:** [February 10, 2004, 10:14pm UTC](https://forum.servoy.com/t/time-picker/1234/4 "2004-02-10T22:14:07Z")

</div>

Thanks. I’m looking forward to the new release.

---

<div class="post-metadata">

**Author:** ![rossent](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rossent](https://forum.servoy.com/u/rossent)\
**Post date:** [March 22, 2013, 8:49am UTC](https://forum.servoy.com/t/time-picker/1234/5 "2013-03-22T08:49:16Z")

</div>

We do need also a dedicated Time Picker field - in many scheduling cases there is a need to display and edit only times and no dates. The Calendar popup has not been updated in a long time. In the Web Client it is even worse - the time edit always uses 0-23 hour clock regardless the format given. Ideally, there should be a separate UI control for editing times (with the appropriate validation!) which is not tied in to the Calendar popup.

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [March 22, 2013, 9:00am UTC](https://forum.servoy.com/t/time-picker/1234/6 "2013-03-22T09:00:44Z")

</div>

Hi Rossen,

I guess something like this could be built into the [JSDatePicker module](https://www.servoyforge.net/projects/mod-datepicker).  
Or do you _require_ that it’s all done in/on the field on the form ?

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [March 22, 2013, 10:06am UTC](https://forum.servoy.com/t/time-picker/1234/7 "2013-03-22T10:06:50Z")

</div>

Hi Rossen,

why kicking a 9yr old thread up for this?

I think there’s multiple ways to have easy time entry now.

Just put up a date field and set the format to ‘HH:mm|HHmm’  
Users will see a nice time portion: ‘13:45’, but will be able to enter it as ‘1345’

Another nice formatting is: ‘HH:mm|\_|mask’  
Users will see the same as above, but if empty, the field will show ‘ **:** ’ and again users will be able to enter like ‘1345’

be sure to tick the checkbox of the ‘selectOnEnter’ property of the field.

---

<div class="post-metadata">

**Author:** ![rossent](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rossent](https://forum.servoy.com/u/rossent)\
**Post date:** [March 22, 2013, 10:20am UTC](https://forum.servoy.com/t/time-picker/1234/8 "2013-03-22T10:20:05Z")

</div>

> ROCLASI:  
> Hi Rossen,
> 
> I guess something like this could be built into the [JSDatePicker module](https://www.servoyforge.net/projects/mod-datepicker).  
> Or do you _require_ that it’s all done in/on the field on the form ?

The goal is to have everything done in the field on the form without any additional popups

---

<div class="post-metadata">

**Author:** ![rossent](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rossent](https://forum.servoy.com/u/rossent)\
**Post date:** [March 22, 2013, 10:28am UTC](https://forum.servoy.com/t/time-picker/1234/9 "2013-03-22T10:28:15Z")

</div>

> mboegem:  
> Hi Rossen,
> 
> why kicking a 9yr old thread up for this?
> 
> I think there’s multiple ways to have easy time entry now.
> 
> Just put up a date field and set the format to ‘HH:mm|HHmm’  
> Users will see a nice time portion: ‘13:45’, but will be able to enter it as ‘1345’
> 
> Another nice formatting is: ‘HH:mm|\_|mask’  
> Users will see the same as above, but if empty, the field will show ‘ **:** ’ and again users will be able to enter like ‘1345’
> 
> be sure to tick the checkbox of the ‘selectOnEnter’ property of the field.

This is exactly what we have currently - using the CALENDAR type field (to validate the input) with a format which includes only the time part - however the Calendar button is still present and cannot be removed/disabled, so users can still click it… and then start asking questions like: “why there is a calendar on a time field? what date should we select? why the time editor in the calendar does not use the correct format (in the case of the Web Client)?”  
We tried doing things like putting two separate SPINNER fields to represent separately the hours and minutes, but those cannot be bound directly to the datetime dataproviders/columns and need to be manually handled in both directions (setting and getting the hours/minutes) - that in my opinion should be handled “out-of-the-box” with the appropriate UI control from Servoy which after 9 years is still missing in their toolbox. (this explains why I chose to “kick” this old thread)

In short, what we need is this: a new standard Servoy UI control which can be bound to a datetime dataprovider (like the CALENDAR) but which displays and manipulates only the time portion of the datetime value (utilizing a format similar to what the CALENDAR field is doing) - it does not need to have any button like the CALENDAR, but if it does, the popup should contain only time-relevant information (like hours, minutes, seconds, etc. and options to set the value to the current time, increment/decrement the different time parts, etc.)

In my opinion, this is quite simple to be implement for Servoy, is a standard part of all other major development platforms, is supported on all clients (Smart, Web, Mobile) and is a functionality which most users expect in any scheduling or other business application which has to deal with times.

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [March 22, 2013, 10:37am UTC](https://forum.servoy.com/t/time-picker/1234/10 "2013-03-22T10:37:39Z")

</div>

> rossent:  
> This is exactly what we have currently - using the CALENDAR type field (to validate the input) with a format which includes only the time part - however the Calendar button is still present and cannot be removed/disabled, so users can still click it… and then start asking questions like: "why there is a calendar on a time field? what date should we select?

Just use a type: ‘TEXTFIELD’ for it.  
No need for a calendar type field at all…

---

<div class="post-metadata">

**Author:** ![rossent](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rossent](https://forum.servoy.com/u/rossent)\
**Post date:** [March 22, 2013, 1:41pm UTC](https://forum.servoy.com/t/time-picker/1234/11 "2013-03-22T13:41:44Z")

</div>

> mboegem:
> 
> > rossent:  
> > This is exactly what we have currently - using the CALENDAR type field (to validate the input) with a format which includes only the time part - however the Calendar button is still present and cannot be removed/disabled, so users can still click it… and then start asking questions like: "why there is a calendar on a time field? what date should we select?
> 
> Just use a type: ‘TEXTFIELD’ for it.  
> No need for a calendar type field at all…

The TEXTFIELD is a possible workaround but is far from a perfect solution. The formats of type “hh:mm aa|hhmmaa” allow the users to type in anything they want without restricting the input only to the applicable digits or am/pm and then they get stuck with the “red” data wondering what is wrong; the formats of type “hh:mm aa|\_|mask” behave a little bit better because they do limit the input a bit (allow only digits for the hours/minutes but in the am/pm place users can still enter any character they want) but users still must enter am/pm instead of selecting this from a list which is not very intuitive when all they see in the blank field is “ **:** \_\_”. In addition, there is no way to increment/decrement the hours/minutes/etc. with the keyboard (by using up/down arrows like you can in the CALENDAR).

I hope that you would agree that there is quite a bit room for improvement. Just check out what the vendors of the leading UI components offer and compare them with the UI controls in Servoy. After all, it is 21st century and users expect a lot more from professional applications - so do developers from their development platform vendors.

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [March 22, 2013, 4:08pm UTC](https://forum.servoy.com/t/time-picker/1234/12 "2013-03-22T16:08:07Z")

</div>

Hi Rossen,

I suggest you file this as feature request in Jira.
