Date-time best practice

High,

I have a datetime field in a table.
How do I best allow the user to select date and enter/select a time ?

I tried two options.
Are there other/better options to do this ??

  1. Option 1

display two fields of type date with the same dataprovider.
one field has a format of dd-MM-yyyy where the user can select
a date with the servoy datepicker.
the other has a format of HH:mm where the user can type the time.

This can give some strange results when the enters an invalid time like 99:99

  1. Option 2

Display one field of type date with a format of dd-MM-yyyy HH:mm

The user can now select a date and enter a time in the servoy datepicker.

A slight problem is the clipping of the first digit if it is a zero
(see screenshot)

Regards,

Hans

A good way could be a field just for the date and then two combos for hour and minutes. That has a little bit more of work to create the final value for the field but looks better. If you upgrade to 6.1 you could even user spinners instead of combos. Hey another good reason to upgrade to 6.1 !!!

Using combos or spinners you could even restrict the minutes to be used, for example in five minutes steps.