jQWidgets Forums
jQuery UI Widgets › Forums › Scheduler › Dialog window Buttons
Tagged: jquery scheduler, jqwidgets scheduler, scheduler
This topic contains 7 replies, has 3 voices, and was last updated by manjulam 9 years, 1 month ago.
-
AuthorDialog window Buttons Posts
-
HI Peter, I wonder if I can remove the default buttons of the dialog window, like “Save, Delete, Cancle”.
Hi Jacky,
You can, by customizing the jqxScheduler’s Edit Dialog. Please, look at: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxscheduler/scheduler-edit-dialog.htm?arctic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks, but in this demo, it shows how to add buttons, I want to remove or hide the default buttons.Just like hide the delete button.
Hi Jacky,
In the Scheduler’s demo is shown how to access the buttons using fields.buttons. Then by using a sub-property of the buttons object you will be able to access the particular buttons and call the hide() method.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comI have a requirement to check the status of an appointment and prevent deleting the appointment in some cases. I tried to hide the delete button in the editDialoOpen event but it did not work. This is what I have tried:
editDialogOpen: function (dialog, fields, editAppointment)
{if(editAppointment.status.toUpperCase() != ‘AVAILABLE’)
{
fields.deleteButton.hide();
//fields.saveButton.hide();}
},I am able to hide the save and cancel buttons, just not the delete button. Any guidance is appreciated.
Hi manjulam,
The deleteButton is shown/hidden dynamically by the Scheduler. If you want to remove it, use:
$("#scheduler").on('editDialogCreate', function (event) { var args = event.args; var dialog = args.dialog; var appointment = args.appointment; var fields = args.fields; args.fields.deleteButton.remove(); console.log("editDialogCreate is raised"); });
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThank you for the reply. Really appreciate your quick response. Our requirement is to hide/show the delete button conditionally.
If that is not an option, is there a way to check a condition in the delete event of the appointment and in some way not remove the appointment from the calendar?I work for a small startup and I am evaluating the product features and our requirements. Quite happy with the product offering so far, and hope to find a good workaround for our requirements. I think it will be a good value addition to buy your product suite. Thank you.
Manjula
I was able to disable and enable the delete button conditionally like this:
if(editAppointment.status.toUpperCase() != ‘AVAILABLE’)
{
fields.deleteButton.jqxButton({ disabled: true });}
else
{
fields.deleteButton.jqxButton({ disabled: false });
}
It would be nicer to hide the button though. -
AuthorPosts
You must be logged in to reply to this topic.