jQuery UI Widgets Forums General Discussions DateTimeInput error on mobile

This topic contains 3 replies, has 2 voices, and was last updated by  admin 2 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • DateTimeInput error on mobile #121355

    injwnag0820
    Participant

    Hi, I use the code below, there some error on iPhone Chrome browser,but Desktop chrome is OK.

    I check the jqxDateTimeInput API Reference, but there are no method to set Date with time.

    Is any way to set it correctly?

    .jqxDateTimeInput({
    width: 150,
    height: 30,
    showTimeButton: true,
    formatString: “yyyy年MM月dd日 HH:mm:ss”,
    firstDayOfWeek: 1,
    showDeleteButton: true,
    template: “info”,
    value: “2022-01-11 14:26:34”, //add this will make error on my iPhone chrome, but Desktop chrome is OK
    culture: ‘zh-TW’
    });

    jQWidgets version : v13.1.0 (2021-Nov)

    • This topic was modified 2 years, 5 months ago by  injwnag0820.
    DateTimeInput error on mobile #121358

    admin
    Keymaster

    Hi injwnag0820,

    I think the problem here is that the value should be a date.

    Example:$(‘#jqxDateTimeInput’).jqxDateTimeInput({ value: new Date(2000, 0, 1) });

    Best regards,
    Peter Stoev

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

    DateTimeInput error on mobile #121365

    injwnag0820
    Participant

    Hi Admin:

    Thx your reply.

    There have showTimeButton attribute, so user set time to jqxDateTimeInput. But why can’t set time by default?

    Why I set value like “2022-01-11 14:26:34” is correctly on desktop, but only fail on mobile?

    DateTimeInput error on mobile #121369

    admin
    Keymaster

    Hi injwnag0820,

    You can set a Date object which includes the hour, minute and second, too. It seems that Chrome browser on Iphone and desktop behaves differently when handling and parsing date strings so the best solution would be to use a Date object in order to resolve that.

    Best regards,
    Peter Stoev

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

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

You must be logged in to reply to this topic.