jQuery UI Widgets › Forums › Scheduler › CRUD with php/mysql
Tagged: angular scheduler, javascript scheduler, jquery scheduler widget, jqwidgets scheduler, jqxScheduler, scheduler
This topic contains 28 replies, has 2 voices, and was last updated by ritttchy 8 years, 11 months ago.
-
AuthorCRUD with php/mysql Posts
-
Hello,
Is it possible to do CRUD with php mysql on the scheduler if so thank you to help me if possible.
Hi ritttchy,
The Scheduler raises appointmentDelete, appointmentAdd and appointmentChange events when there is some change regarding appointments which means that when you bind to these events, within the event handlers you can use the jQuery’s AJAX method and send the updated data to your PHP. In your PHP code, you can get the changes and make the MySQL function call with the updated data.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Thank you
It works with different methods, I have only a passing-standing problem in ajax. How to set the start and end date fields in the SQL for insertion Date format. In addition the display must match the type size French Day DD / MM / YYYY HH: MMHi ritttchy,
For SQL Insertion of dates, you can look at: http://stackoverflow.com/questions/12957635/sql-query-to-insert-datetime-in-sql-server
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hello,
The problem is not just inserting SQL but the date format is sent in AJAX type invalid Date: Wed October 14, 2015 0:30:00 GMT + 0200 (CEST)
My question is how to change the date format for the passage of datas in AJAXThank you
Hi ritttchy,
That’s as far as I see a JavaScript Date object. Anyway, appointments work with jqxDate objects. The jqxDate object have toString() method. The toString() method has “format” argument which you can use to pass the DateTime format you wish and it will return you a DateTime string in a format of your choice. By default it returns yyyy-MM-dd format. For more information about the toString() method of our jqxDate object, please refer to: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxscheduler/jquery-scheduler-getting-started.htm
Hope this helps.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Re.
I arrive well to insert an appointment in database but when I pass the mouse over it I have a message: “Uncaught TypeError: Can not read property ‘jqxAppointment off undefined”
and it is impossible to edit the appointment because the dialog box does not open.Thank you
Information for the appointment appointmentChange event does not return the new values but only the old values
Hi ritttchy,
Ok, send me please jsfiddle.net demo or demo like that https://www.jseditor.io/?key=jqxscheduler-events which demonstrates this because I cannot reproduce it.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Ok, I found the solution to display the new values for appointmentChange event:
$(‘#scheduler’).on(‘appointmentChange’, function (event) {
console.log(‘— appointmentChange —‘);
var args = event.args;
var appointment = args.appointment;
var id = appointment.id
var from = new $.jqx.date($(‘#scheduler’).jqxScheduler(‘getAppointmentProperty’, appointment.id, ‘from’)).toString();
var to = new $.jqx.date($(‘#scheduler’).jqxScheduler(‘getAppointmentProperty’, appointment.id, ‘to’)).toString();
………
});However, I have another problem on resourceId with JSON datatype resources: Uncaught TypeError: Can not read property ‘length’ of undefined.
Using your demo and then type datas table it works but not in JSON format. Is this a BUG or not?I have another question, is it possible to add resources from another source than an appointment with a foreign key SQL?
Hi ritttchy,
The resources object have a different source object so it is only on your logic what source they would use. If you think there is some issue on our side then provide jsfiddle or jseditor example like that: https://www.jseditor.io/?key=jqxscheduler-with-ribbon.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Thank you but I asked you a question before to validate the use of the resources JSON :
However, I have another problem on resourceId with JSON datatype resources: Uncaught TypeError: Can not read property ‘length’ of undefined.
Using your demo and then type datas table it works but not in JSON format. Is this a BUG or not?Hi ritttchy,
You do not provide any information so I cannot tell whether It is or is not. I do not know whether you use the widget correctly. I asked you several times for example. If you do not wish to provide such, then I would not be able to help you.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/the url link for the test : https://www.jseditor.io/?key=rlar-scheduler-json
-
AuthorPosts
You must be logged in to reply to this topic.