Question

Datetime control throwing "Not a valid date value" exception when the user enters the date in "MMddyyyy" format

Hi,

We are using DateTime control as Text+calender and type as Date and when the user enters Date manually as "MMddyyyy" and click on the button Pega is throwing an Invalid date value message at the bottom of the field which blinks for a second and then sets the value to "mm/dd/yyyy". For this reason I need to click on the button twice to proceed.

eg: user entered 03022014. on click of submit button "Not a valid date value" blinks for a second and then the value is set as 3/2/2014.next when i click on submit i am able to proceed. We are using Pega 7.1.8 version

Can you suggest how to handle this so that the user can proceed on a single click

Thanks,

Santhi

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

March 27, 2017 - 10:30am

Hi,

With regular Date type property, MMDDYYYY will be treated as incorrect date format and system prompts with this error message "Not a valid date value".

Could you please have a look on the below article :

https://pdn.pega.com/community/pega-product-support/question/how-allow-user-input-date-format-mmddyyyy

Please let me know if it helps.

March 30, 2017 - 6:40am
Response to AkshaySinha

Hi Akshay,

I tried the same way using a datatransform but it did not resolve my issue. It is still throwing the same error which blinks and then sets the value and I have to click the button twice.

 

Thanks,

Santhi

 

 

March 30, 2017 - 7:48am
Response to SanthiKiranS

Hello Santhi,

Are you able to try this behavior on UI gallery? 

Please try and let us know the results.

However as per User Experience I suggest that you just have date picker rather than entering values directly.

Let me know if you have any questions.

Regards,

Shanthini Charles

March 30, 2017 - 10:02am

Hi Santhi,

Is this behaviour only observed when you enter the date manually or if you choose the date from datepicker too ?

Please update us with the information.

April 12, 2017 - 10:00am
Response to AkshaySinha

Hi Akshay,

The issue is only when we enter the date manually. There is no issue when we choose datepicker.

 

Thanks,

Santhi

 

 

April 12, 2017 - 10:03am
Response to maheshmadi

Hi Mahesh,

As mentioned earlier for better user experience please ensure you use a date picker.

However let us the exact usecase why you want to enter values manually and also providing a date picker?

Regards,

Shanthini Charles

April 13, 2017 - 7:55am
Response to Shanthini_Charles

Hi Shanthini

Business wants to allow the users to either choose the datepicker or provide an option to enter the date manually in mmddyyyy or mmddyy formats

 

Thanks,

Santhi

April 21, 2017 - 7:50am
Response to SanthiKiranS

Hello Santhi,

Are you using any edit validate on that element? Can you please provide the design time screen shots.

Regards,

Shanthini Charles