• Mikael Eriksson
    November 9, 2016 at 4:15 am #3022


    In our datepickers we want to have the format “yyyy-mm-dd” for presenting. However we have a request that the users should be able to ender the dates without the dashes eg. 20161109. I have tried to find a configuration or using events to handle this but have not succeded.

    Do you have any ideas/suggestions on how such a thing could be handled with a Datepicker? (Or some simple way to do it with a combo of textfield and datepicker)


    When experimenting a bit around this I also came up with two issues:


    Issue 1 – It seem that the datepicker requires some separator between the different parts of the date. I set  the format to yyyymmdd, then the output date was formatted correctly after chosing a date in the calendar view. But if I changed the date in the textfield I always got a format error even if the date should parse.



    Issue 2 – I had the datepicker in a horizontal layout. If the horizontal layout have its layout as “Justified” the error message from the datepicker i shown correctly but if the layout is “Left” the error message is partly hidden. See the attached pictures for this.







    SPARK Support
    November 16, 2016 at 10:54 am #3085

    Hi Mikael,

    I was able to replicate your first issue.  The issue with the Date Picker control flagging the “yyyymmdd” format as invalid has been logged as a bug and will be fixed in an upcoming version.

    I was not able to replicate the issue with Horizontal Layout clipping the error message text.  You may wish to try specifying some additional height and change the vertical alignment.  Please provide more details on your configuration if you would like for me to take a look at it.


    Stephen P.

    Mikael Eriksson
    November 18, 2016 at 8:03 am #3118

    I did not do anything special for the configuraation, just a horizontal layout with three elements, the last beeing the datepicker.

    About the first thing, data formatting. We have currently solved it with a custom coach view and som javascript that adds the dashes as they are written. But when looking at the “Masked Text” control I realized that this is the kind of behaviour we would like. So if the masked text functionality was added to the datepicker (i.e. using the format as a mask) that should be really nice 🙂


    SPARK Support
    November 18, 2016 at 3:04 pm #3125

    Hi Mikael,

    Thank you for the Feedback.  That is a great suggestion.  I will ad this to our backlog as a Feature Request.

    The Date Picker does have the option for placeholder text, but it does not write the dashes for the user.


    Stephen P.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search