jQuery UI Widgets Forums Scheduler Appointments not showing

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 6 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Appointments not showing #101357

    CXXXV
    Participant

    Here is code….no appointments

    ` var appointments = new Array();

    var appSTART = “2018-08-03 09:00”;
    var appEND = “2018-08-03 16:00”;

    var appointment1 = {
    id: “1”,
    subject: “APPOINTMENT NUMBER 1”,
    start: new Date(appSTART),
    end: new Date(appEND)
    }

    appointments.push(appointment1);

    var source =

    {
    dataType: “array”,
    dataFields: [
    { name: ‘id’, type: ‘string’ },
    { name: ‘subject’, type: ‘string’ },
    { name: ‘start’, type: ‘date’, format: “yyyy-MM-dd HH:mm” },
    { name: ‘end’, type: ‘date’, format: “yyyy-MM-dd HH:mm” }

    ],

    id: ‘id’,

    localData: appointments

    };

    var adapter = new $.jqx.dataAdapter(source);

    $(“#scheduler”).jqxScheduler({

    date: new $.jqx.date(2018, 07, 30),
    width: getWidth(‘Scheduler’),
    height: 1200,
    source: adapter,
    view: ‘weekView’,
    showLegend: true,
    ready: function () {
    $(“#scheduler”).jqxScheduler(‘ensureAppointmentVisible’, ‘1’);
    },

    resources:

    {
    colorScheme: “scheme05”,
    source: new $.jqx.dataAdapter(source)
    },

    appointmentDataFields:
    {
    from: “start”,
    to: “end”,
    id: “id”,
    subject: “subject”,
    },

    views:
    [
    ‘dayView’,
    ‘weekView’,
    ‘monthView’
    ]

    });

    });`

    Appointments not showing #101384

    Hristo
    Participant

    Hello CXXXV,

    The mapping that you use for the dates in the DataAdapter is created for the string.
    You should make research to parse the date in ‘Date’ object.
    Please, take a look at this example.

    Best Regards,
    Hristo Hristov

    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.