Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
705
How to get WebDate Picker to work with format of YYYYMMDD
posted

I cannot get the the webDatePicker to work as we would like.  I am replacing old text boxes that took the input as YYYYMMDD and passed that to the DB.

I need to retain that data input format so as not to disrupt the userbase but I want to allow the use of the calendar and also show the typed in date as dd-MMM-YYYY so it is very clear what they have selected.

My problem is that it is not working as expected and I get translated values of Na-NaN-0NaN after trying to edit and the input mask doesn't like yyyyMMdd.

What am I missing?

DisplayModeFormat = dd-MMM-yyyy

EditModeFormat = yyyyMMdd

I've tried playing with the DataMode property but that doesn't seem to help.

Input -> 20010305  -> tab away -> display 05-Mar-2010.  Seems simple enough...

thanks

jack

 

Parents
  • 24497
    posted

    Hi Jack,

    The WebDateTimeEditor/DatePicker does not support pattern without separators between fields. It should be at least empty space.

    It is not clear for me how display/edit pattern of WebDateTimeEditor can be related to format of data in DB. The Value on server is DateTime object. Well you may use Text property, but to exchange data with DB it does not look right to me. Also date pattern without separators can be confusign for end users.
    If you do use Text to exchange data between DB and WebDateTimeEditor, then I can suggest you to use "yyyy-MM-dd" or "yyyy MM dd" and remove/insert that separator on get/set

Reply Children