jQWidgets Forums

jQuery UI Widgets Forums Editors DateTimeInput Set date based on Date?

This topic contains 4 replies, has 2 voices, and was last updated by  Peter Stoev 9 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Set date based on Date? #75510

    realtek
    Participant

    Hi,

    Is it possible to set a DateTime input using an actual date value such as ‘MM/DD/YYYY’ rather than having to segment the parts out (i.e, 2015, 05, 05) ?

    My date is coming from a database and ideally I could just use the raw format.

    Thanks

    Set date based on Date? #75512

    realtek
    Participant

    Or is it ok to just put the date value in date format into the HTML element?

    For some reason specifying <Div value=’04/04/2013′ /> seems to work? Is that as designed?

    Set date based on Date? #75513

    realtek
    Participant

    Ignore my last comment, it was my code doing that as I am storing the date in a attribute called ‘value’ on the div element and getting this from the javascript side.

    Seems to work although I am having issues with UK dates!

    Set date based on Date? #75514

    realtek
    Participant

    I’m confused, I have a UK based date (DD/MM/YYYY HH:mm:ss) in an HTML field.

    I was to display this exactly as it is in a DateTimeField.

    How can I do that? I have tried everything, even converting it using a javascript function to switch around the MM/DD

    Regards

    Set date based on Date? #75535

    Peter Stoev
    Keymaster

    Hi realtek,

    jqxDateTimeInput works with JavaScript Date objects. This is what you should use for setting a Date, this is also what you get as a result from the widget.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.