• Mikael Eriksson
    November 1, 2016 at 8:55 am #2979

    I have a datepicker with the Available End Date set to today and binding it to a Date that is also today.

    The datepicker then don’t want to show the date since it thinks that the bound date is after the end date if the bound date has its time set to anything other than zero.

    The datepicker is bound to tw.local.today, and has its Available End date bound to tw.local.todayString.

    The format is “yyyy-mm-dd”.

    The date and string are initiated with  this code:

    
    var now = new Date();
    tw.local.today =now;
    // Uncomment following to make date be shown in datepicker
    // tw.local.today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
    function makeTwoDigits(d)
    {
    if (d<10) return "0" + d;
    return d;
    };

    tw.local.todayString = now.getFullYear() + “-” + makeTwoDigits(now.getMonth()+1) + “-” +makeTwoDigits(now.getDate());

     

    Uncommenting the line setting today to a Date with just the year,month and day will make the datepicker accept the date and show it.

     

    It would be nice if any date that is on today would be allowed in the datepicker 🙂

    Regards

    /Mikael

     

     

    SPARK Support
    November 7, 2016 at 1:15 pm #3005

    Hi Mikael,

    I have attempted to recreate your scenario.  Can you please take a screen shot of the issue as it is happening?

    Also, what is the UTC time zone you are in?

    Regards,

    Stephen P.

    Mikael Eriksson
    November 8, 2016 at 12:23 am #3009

    Hi,

    I am in Sweden so it is GMT+1. (Currently on daylight savings time).

    I attach some screenshots of the config of the datepicker and how it looks in runtime. Are there some other screenshots you would need?

    SPARK Support
    November 14, 2016 at 4:54 pm #3061

    Hi Mikael,

    I was able to replicate this issue.  I have logged this as a bug to be fixed in an upcoming release.

    For now, the best work around would be to add one day to the date.

    Regards,

    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