cancel
Showing results for 
Search instead for 
Did you mean: 

Time and date validations

Former Member
0 Kudos

I have created 2 context attributes of type time and date and assigned to input field elements.

So when user enters time other than the formats(hh:mm AM or PM example 12:00 AM or 12 PM or 24hr format like 22:40 no need of seconds) how to do validations on this and

Similarly for date if user enters other than the format (mm/dd/yy) i should validate and throw error.

Are there any prevalidations exists e for these two types like for date if entered more than 12 or for month more than 31, auto validations exists depending on the type or need to manually handle these.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Ok , in other words how can i set the format of the Time data type to accept and validate 24hr format.Is ait by creating a simpletype in dictionary of type time and putting the format , what should be the format?

Thanks.

Former Member
0 Kudos

Hi,

if you bind input field with attribute of type "date" default the formate(mm/dd/yyyy) validation will perform on event.

Regards,

ramesh