Generating agenda

Hi,

I am trying to make a widget which will show the agenda text but it will not be on the scheduler page. Is there a way to do that?

Hello, hermit.

Is scheduler files are attached on this page?
If so you can do following:

var evs = scheduler.getEvents(new Date(2009,1,10),new Date(2009,1,25)); 
for (var i=0; i<evs.length; i++) {
	// append some html
}

Best regards,
Ilya

Hi,

I am loading json data from the database into the scheduler using the following code.

if (data != null && data.PracticeCalendarDTOSet != null) {
	scheduler.parse(data.PracticeCalendarDTOSet, "json");
}

Now my calender is initialized as

scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.init('scheduler_here', new Date(), "day");

The database is sending the following data

 
	
PracticeCalendarDTOSet
	[Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1298514536573-0500)/", more...}, Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299118573270-0500)/", more...}, Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299717777943-0500)/", more...}, 4 more...]
 
	
0
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1298514536573-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1298514536573-0500)/"
 
	
LastEditDate
	"/Date(1299192020220-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	""
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"0f5ed4e0-cd5c-4d10-89e5-1df65094af1b"
 
	
ProviderName
	"ajay sharma"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"Annual PE"
 
	
end_date
	"2011-03-03 14:45:00Z"
 
	
event_length
	0
 
	
event_pid
	0
 
	
id
	"e9c330b0-44c5-4d36-c7e5-007b2b42fd1d"
 
	
rec_pattern
	""
 
	
rec_type
	null
 
	
start_date
	"2011-03-03 10:10:00Z"
 
	
text
	""
 
	
1
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299118573270-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1299118573270-0500)/"
 
	
LastEditDate
	"/Date(1299118573270-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	null
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"z33"
 
	
end_date
	"2011-03-02 17:35:00Z"
 
	
event_length
	0
 
	
event_pid
	0
 
	
id
	"3a60b871-5a51-456d-b644-09aa8dc40270"
 
	
rec_pattern
	""
 
	
rec_type
	null
 
	
start_date
	"2011-03-02 13:35:00Z"
 
	
text
	""
 
	
2
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299717777943-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1299717777943-0500)/"
 
	
LastEditDate
	"/Date(1299717777943-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	null
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"Select Visit Type"
 
	
end_date
	"9999-02-01 16:05:00Z"
 
	
event_length
	12900
 
	
event_pid
	0
 
	
id
	"5eac2493-2324-5246-f08f-47e0441b30e2"
 
	
rec_pattern
	"week_1___1,2,3,4,5"
 
	
rec_type
	"week_1___1,2,3,4,5#no"
 
	
start_date
	"2011-03-18 12:30:00Z"
 
	
text
	""
 
	
3
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1298512396663-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1298512396663-0500)/"
 
	
LastEditDate
	"/Date(1299032945007-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	""
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"Annual PE"
 
	
end_date
	"9999-02-01 15:20:00Z"
 
	
event_length
	19500
 
	
event_pid
	0
 
	
id
	"02c19d70-38a6-8313-8ab1-abbc7e5e16fe"
 
	
rec_pattern
	"week_1___5"
 
	
rec_type
	"week_1___5#no"
 
	
start_date
	"2011-03-18 09:55:00Z"
 
	
text
	""
 
	
4
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299716932773-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1299716932773-0500)/"
 
	
LastEditDate
	"/Date(1299716932773-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	null
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"Select Visit Type"
 
	
end_date
	"9999-02-01 14:10:00Z"
 
	
event_length
	10500
 
	
event_pid
	0
 
	
id
	"96de9197-769f-f446-9e10-b79cd66bc10f"
 
	
rec_pattern
	"week_1___1,2,3,4,5"
 
	
rec_type
	"week_1___1,2,3,4,5#no"
 
	
start_date
	"2011-03-23 11:15:00Z"
 
	
text
	""
 
	
5
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299721024880-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1299721024880-0500)/"
 
	
LastEditDate
	"/Date(1299721024880-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	null
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"Select Visit Type"
 
	
end_date
	"9999-02-01 21:25:00Z"
 
	
event_length
	15900
 
	
event_pid
	0
 
	
id
	"40e3db36-24b6-1d01-c8fb-c327923f13f3"
 
	
rec_pattern
	"day_1___"
 
	
rec_type
	"day_1___#no"
 
	
start_date
	"2011-03-09 17:00:00Z"
 
	
text
	""
 
	
6
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299100273910-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1299100273910-0500)/"
 
	
LastEditDate
	"/Date(1299100273910-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	null
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"E-mail encounter"
 
	
end_date
	"2011-03-02 11:35:00Z"
 
	
event_length
	0
 
	
event_pid
	0
 
	
id
	"dd87ef0e-54c1-59da-21ac-f49607a246fe"
 
	
rec_pattern
	""
 
	
rec_type
	null
 
	
start_date
	"2011-03-02 10:35:00Z"
 
	
text
	""

but the scheduler is loaded with the following data

3a60b871-5a51-456d-b644-09aa8dc40270
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299118573270-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1299118573270-0500)/"
 
	
LastEditDate
	"/Date(1299118573270-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	null
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"z33"
 
	
_timed
	true
 
	
end_date
	Wed Jul 03 2069 17:35:00 GMT-0400 (Eastern Daylight Time) {}
 
	
event_length
	0
 
	
event_pid
	0
 
	
id
	"3a60b871-5a51-456d-b644-09aa8dc40270"
 
	
rec_pattern
	""
 
	
rec_type
	null
 
	
start_date
	Wed Jul 03 2069 13:35:00 GMT-0400 (Eastern Daylight Time) {}
 
	
text
	""
 
	
5eac2493-2324-5246-f08f-47e0441b30e2
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299717777943-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1299717777943-0500)/"
 
	
LastEditDate
	"/Date(1299717777943-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	null
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"Select Visit Type"
 
	
_timed
	true
 
	
end_date
	Fri Mar 02 2734 16:05:00 GMT-0500 (Eastern Standard Time) {}
 
	
event_length
	12900
 
	
event_pid
	0
 
	
id
	"5eac2493-2324-5246-f08f-47e0441b30e2"
 
	
rec_pattern
	"week_1___1,2,3,4,5"
 
	
rec_type
	"week_1___1,2,3,4,5#no"
 
	
start_date
	Tue Jul 03 2085 12:30:00 GMT-0400 (Eastern Daylight Time) {}
 
	
text
	""
 
	
02c19d70-38a6-8313-8ab1-abbc7e5e16fe
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1298512396663-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1298512396663-0500)/"
 
	
LastEditDate
	"/Date(1299032945007-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	""
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"Annual PE"
 
	
_timed
	true
 
	
end_date
	Fri Mar 02 2734 15:20:00 GMT-0500 (Eastern Standard Time) {}
 
	
event_length
	19500
 
	
event_pid
	0
 
	
id
	"02c19d70-38a6-8313-8ab1-abbc7e5e16fe"
 
	
rec_pattern
	"week_1___5"
 
	
rec_type
	"week_1___5#no"
 
	
start_date
	Tue Jul 03 2085 09:55:00 GMT-0400 (Eastern Daylight Time) {}
 
	
text
	""
 
	
96de9197-769f-f446-9e10-b79cd66bc10f
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299716932773-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1299716932773-0500)/"
 
	
LastEditDate
	"/Date(1299716932773-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	null
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"Select Visit Type"
 
	
_timed
	true
 
	
end_date
	Fri Mar 02 2734 14:10:00 GMT-0500 (Eastern Standard Time) {}
 
	
event_length
	10500
 
	
event_pid
	0
 
	
id
	"96de9197-769f-f446-9e10-b79cd66bc10f"
 
	
rec_pattern
	"week_1___1,2,3,4,5"
 
	
rec_type
	"week_1___1,2,3,4,5#no"
 
	
start_date
	Mon Jul 03 2090 11:15:00 GMT-0400 (Eastern Daylight Time) {}
 
	
text
	""
 
	
40e3db36-24b6-1d01-c8fb-c327923f13f3
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299721024880-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1299721024880-0500)/"
 
	
LastEditDate
	"/Date(1299721024880-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	null
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"Select Visit Type"
 
	
_timed
	true
 
	
end_date
	Fri Mar 02 2734 21:25:00 GMT-0500 (Eastern Standard Time) {}
 
	
event_length
	15900
 
	
event_pid
	0
 
	
id
	"40e3db36-24b6-1d01-c8fb-c327923f13f3"
 
	
rec_pattern
	"day_1___"
 
	
rec_type
	"day_1___#no"
 
	
start_date
	Fri Jul 03 2076 17:00:00 GMT-0400 (Eastern Daylight Time) {}
 
	
text
	""
 
	
dd87ef0e-54c1-59da-21ac-f49607a246fe
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1299100273910-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1299100273910-0500)/"
 
	
LastEditDate
	"/Date(1299100273910-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	null
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"2809aa10-6b08-4d25-abe0-966408164a6a"
 
	
ProviderName
	"Abhi MA"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"E-mail encounter"
 
	
_timed
	true
 
	
end_date
	Wed Jul 03 2069 11:35:00 GMT-0400 (Eastern Daylight Time) {}
 
	
event_length
	0
 
	
event_pid
	0
 
	
id
	"dd87ef0e-54c1-59da-21ac-f49607a246fe"
 
	
rec_pattern
	""
 
	
rec_type
	null
 
	
start_date
	Wed Jul 03 2069 10:35:00 GMT-0400 (Eastern Daylight Time) {}
 
	
text
	""
 
	
e9c330b0-44c5-4d36-c7e5-007b2b42fd1d
	Object { InsertedBy="bc4fd768-a18d-4fe7-8d08-fc6be46f2d36", InsertedDate="/Date(1298514536573-0500)/", more...}
 
	
InsertedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
InsertedDate
	"/Date(1298514536573-0500)/"
 
	
LastEditDate
	"/Date(1299192020220-0500)/"
 
	
LastEditedBy
	"bc4fd768-a18d-4fe7-8d08-fc6be46f2d36"
 
	
PatientEmail
	""
 
	
PatientID
	"00000000-0000-0000-0000-000000000000"
 
	
PatientName
	"Busy"
 
	
PatientPreferredContact
	null
 
	
PatientStatus
	"Select Patient's Status"
 
	
ProviderID
	"0f5ed4e0-cd5c-4d10-89e5-1df65094af1b"
 
	
ProviderName
	"ajay sharma"
 
	
Subject
	null
 
	
Tags
	null
 
	
TypeOfVisit
	"Annual PE"
 
	
_timed
	true
 
	
end_date
	Thu Jul 03 2070 14:45:00 GMT-0400 (Eastern Daylight Time) {}
 
	
event_length
	0
 
	
event_pid
	0
 
	
id
	"e9c330b0-44c5-4d36-c7e5-007b2b42fd1d"
 
	
rec_pattern
	""
 
	
rec_type
	null
 
	
start_date
	Thu Jul 03 2070 10:10:00 GMT-0400 (Eastern Daylight Time) {}
 
	
text
	""

The dates are coming out to be weird. Another thing i am doing is making the scheduler_here div hidden. I just need to events to display in my widget. But the events which are getting loaded are wrong.