jQWidgets Forums

jQuery UI Widgets Forums Editors DateTimeInput Cannot set date

This topic contains 2 replies, has 2 voices, and was last updated by  Mariya 9 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Cannot set date #75067

    lqyan
    Participant

    hi,
    The following code can not be executed………….

    <div style=”margin: 10px;” id=’jqxDateTimeInput’></div>
    <input type=”button” id=”btn1″ />

    $(“#jqxDateTimeInput”).jqxDateTimeInput({
    width: ‘250px’,
    height: ’25px’,
    theme: ‘energyblue’
    });

    $(‘#jqxDateTimeInput ‘).jqxDateTimeInput(‘setDate’, new Date(2014, 1, 1));
    btn.click(function(){
    $(‘#jqxDateTimeInput ‘).jqxDateTimeInput(‘setDate’, new Date(2014, 4,1));
    $(‘#jqxDateTimeInput ‘).val(new Date(2014, 4, 1));
    $(‘#jqxDateTimeInput ‘).val(‘2014-4-1’);

    });
    Please tell me
    How to set the date?

    Cannot set date #75069

    lqyan
    Participant

    Is this………. $(‘#btn1’)

    Cannot set date #75073

    Mariya
    Participant

    Hi lqyan,

    Please take a look at the provided example at: http://jsfiddle.net/jdhdwyd0/
    As you can see you are not initializing your button and then you are not using the right id.

    Best Wishes,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.