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.
-
AuthorAppointments not showing Posts
-
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’
]});
});`
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 HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.