jQWidgets Forums
jQuery UI Widgets › Forums › Scheduler › Lock Status
This topic contains 11 replies, has 2 voices, and was last updated by Todor 5 years, 9 months ago.
-
AuthorLock Status Posts
-
Is there a way to lock status to “Out Of Office” for all items created?
Hello mobiyan,
I’m not quite sure what you mean by’lock status’, but you could set scheduler’s statuses with a statuses property. Also you could review the following example.
Let us know if you need further assistance.
Best Regards,
TodorjQWidgets Team
https://www.jqwidgets.comWhat I meant is I want to allow only Out Of Office status on all created appointments.
I tried with
this.scheduler.setAppointmentProperty(appointment.id, "status", "OutOfOffice");
this.scheduler.setAppointmentProperty(appointment.id, “subject”, “test”);
It works for the subject, but not for the status
I created a sample to see it:
Hello mobiyan,
I’ve updated your sample. The only thing that I’ve change is status to “status” in
this.scheduler.setAppointmentProperty(appointment.id, "status", "outOfOffice");
.Let us know if you need further assistance.
Best Regards,
TodorjQWidgets Team
https://www.jqwidgets.comStill not working, if you look at the sample in https://stackblitz.com/edit/github-tkcks7
Sorry I saw that it is working in your version
Thanks for your help!
Hello @todor,
I noticed that when using setAppointmentProperty, the data when calling getDataAppointments() is not reflecting the right values.
0: Object
calendar: “Room 1”
description: “George brings projector for presentations.”
end: “2018-11-23T21:00:00.000Z”
id: “id1”
location: “”
start: “2018-11-23T14:00:00.000Z”
status: “busy”
subject: “Quarterly Project Review Meeting”Is there a missing step in the code?
You can see the code in : https://stackblitz.com/edit/github-tkcks7
When using the GetAppointment you see clearly that the data is not in sync:
0: Object
description: “George brings projector for presentations.”
from:
id: “id1”
jqxAppointment: “{“id”:”id1″,”from”:”2018-11-23T14:00:00Z”,”to”:”2018-11-23T21:00:00Z”,“subject”:”test”,“status”:”outOfOffice”,”location”:””,”description”:”George brings projector for presentations.”,”resourceId”:”Room 1″,”recurrencePattern”:””,”recurrenceException”:””,”dtstamp”:”2019-07-19T18:05:57Z”}”
location: “”
originalData: Object
resourceId: “Room 1”
status: “busy”
subject: “Quarterly Project Review Meeting”
to:
toString: ƒ ()Hello mobiyan,
I would suggest you few options, because I’m not quite sure which one will fits you the best:
1) You could add to each appointment
status: 'outOfOffice'
. In that way on scheduler’s render all appointments will be with status out of office. In combination with setAppointmentProperty method from the previous example you won’t be able to visually change this status, but if you getAppointments the status will be changed. Updated example with this option.
2) If you want the only status to be out of office you could do that with statuses property. You could review an example with it.Best Regards,
TodorjQWidgets Team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.