jQuery UI Widgets Forums Scheduler Not recognizing dates correctly

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Not recognizing dates correctly #101610

    CXXXV
    Participant

    I have the following appointment:

    	var appointment1 = {			
    		id: "2",
    		description: "",
    		location: "",
    		subject: "CHILI",
    		calendar: "Room 1",
    		start: new Date(2018, 08, 20, 13, 0, 0),
    		end: new Date(2018, 08, 20, 16, 0, 0)
    	}

    The scheduler shows it on September instead of August. I added the file for globalization to US but that did not work.

    Not recognizing dates correctly #101621

    Hristo
    Participant

    Hello CXXXV,

    This is a correct behavior. It becomes from the Date object where the months start from 0.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Not recognizing dates correctly #101634

    CXXXV
    Participant

    So everytime when storing I have to subtract a month and add one when retrieving. That’s dumb. How can I set up scheduler to do that automatically.

    Not recognizing dates correctly #101681

    Hristo
    Participant

    Hello CXXXV,

    Yes, you could use our format option provided with the DataAdapter’s source – { name: 'start', type: 'date', format: 'yyyy/MM/dd hh:mm' }
    Please, take a look at this example.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.