jQWidgets Forums

jQuery UI Widgets Forums Editors DateTimeInput Problem in setting value to Date Picker Input

This topic contains 1 reply, has 2 voices, and was last updated by  Mariya 12 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • rskbuvan
    Spectator

    Hi,

    I’ve a scenario where I get the date from database in the following format, i.e. 08.07.2013 (dd.mm.yyyy) and I’ve to set it to one of date picker field.

    First, I place this value in one hidden field and then I map the same using the following properties provide by jqxWidget.

    Because I’m using jsp and I couldn’t able to map the value directly so I’m doing it in this way. I can able to get the value from hidden field but no improvements. Hence I tried hot coding the value but still nothing,

    Mentioned below is the code snippet for your reference,

    <div class="datePicker" id="startDate" name="" value=""></div>
    $("#startDate").jqxDateTimeInput({width: '100px', height: '25px', theme: theme, formatString:"dd.MM.yyyy"});
    $("#startDate").jqxDateTimeInput('val', "10.02.2013");

    But data picker field is populated only with the today’s date not the new value.

    jqxdatetimeinput.js, jqxcalendar.js – File Version: v2.8.0
    jqxcore – File Version: v2.8.1

    Can anyone please suggest me what could be the problem?

    Thanks & Cheers,
    \_rssb


    Mariya
    Participant

    Hi rskbuvan,

    In order to set the new wanted date you should use the following thing:

    $("#jqxWidget").jqxDateTimeInput('val', new Date(2013, 1, 10));

    I hope it would work for you.

    Best Wishes,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.