how to prevent double click (and many other questions :) )
Dear support :
This kind of scheduler is exactly what I would like :
https://ej2.syncfusion.com/vue/demos/#/material/schedule/group-editing.html
However, I have a couple of questions :
1/ The fact that there are 2 differents modals when I simple click or double click on the same cell is pretty confusing for the user.
=> how can I desactivate the event when I doube click (in order not to show the modal anymore), and get directly the edit modal Dialog when I just click once on the cell ?
2/ I don't want the user to be able to add several events on the same cell.
I just want one event by cell.
=> How can I prevent users from adding several events in one cell ?
3/ To be very concise, when I click on a cell, here is what I would like :
A - It opens an edit dialog to create a " teaching event".
It this dialog, there would be a multiselect to select several students, and another to choose the kind of lessons
=> Could it be possible to have an online sample to show how to include a template form in the edit dialog ?
B - When I click on "submit" and save my datas in a MYSQL database, the dialog will close.
==> How can I show in the cell where I have just created an event an information that would be like " 3 students selected" ?
C - Let's imagine that I can only have 3 students by teaching lessons.
=> How can I prevent users from clicking and editing the event if the max. of studdents is reached , and how them a dialog message "Max students number is reached" ?
4/ How can I populate the scheduler events with my remote datas (from an API ? )
5/ Is it possible to add to theis scheduler a timeline day and a timeline month ?
An online sample to help me would be really great !!
Thank you in advance !
4/ How can I set the date in french ?
( I have to divide my post in sevral part because it was too long to get posted in one go :)
Dear support,
Thank you very much for your answer.
About question 1 :
I cheked your link :https://codesandbox.io/s/vue-template-forked-t5lbo?file=/src/App.vue:5455-5854 , but when I double click in a cell, it still open a dialog.
What I would like is : when I click once, it opens a dialog (this is ok :) ) , and when I double-click in one cell, nothing happens. As if there were no "double click " event.
is it possible ?
About question 2 :
Thank you, this works ! But !
There si something bad : it still opens a dialog !
So when I click on a cell which already contains an appointment, a dialog appears, but when I click save nothing happens => this is OK.
However, would it be possible not to see the dialog at all ?
Like, when I click on a cell where which already contains an appointment, nothings happens ?
About question 3 A and B : thank you, it works!
About question 3 C :
I tried, but it does not work .
Can you help me ? Here is my code, this is in the ScheduleTemplate.vue file, line 308
Questions 4/5 : thank you it works :) :)
Attachment: schedule_1c2ca7c3.zip
(Here is the rest of my post)
I have a couple of extra questions :)
Question 7 :
When I click once on a slot (create mode), I have this dialog :
When I click once on a slot (edit mode) , I have this dialog :
Is it possible to have the same nice header in the create mode dialog than the one I have in the edit dialog, but without the edit and delete button actions ?
Question 8 :
In my edit dialog, I have the edit button. When I click this button, is it possible to directly save the modifications ?
I do not want to open another dialog to edit the datas, since I can already do it in the first dialog ?
Question 9 :
About mutlti select in dialog :
A - If I select on event on the bottom of the scheduler (on the last line) and select a customer (client ) whom has a long name, en ampty space appears
righ below the customer name.
It makes a gap, and then the "add" button disappears. (See picture below)
How is it possible to make it so that :
1 - the "add" button never disappears ?
2 - the empty space does not appear below the customer name in the multiselect line , if the customer name is long ?
B - When I select a customer, everything is OK => the name of the customers appears just
above the red selected line of the multiselect.
But if I click right on the cross just next to the name, and not on the cross at the end of the line, it closes the dialog.
Is it a bug ? Is there a way to prevent this ? When I click on a cross of the multiselect, not matter which one, I juste would like to remove the customer,
not to close the dialog.
Question 10 :
This is a "teaching lesson" scheduler. So, in the scheduler I have 2 needs.
A - we have to see all the teaching lessons appointments (done)
B - We have to see when teachers are on vacation. ( to do )
=> How can I do to help teachers create vacation events/appointments ?
Can it be done in the same scheduler ?
So when a teacher click on a slot, is it possible to make him choose (in the dialog) between a teaching lesson appointment OR a "vacation" appointement, where he could indicate the start date end and the end date of his vacations ?
=> This means that it must not be possible to select an appointment while the teacher is on vacation
Thank you in advance for your help :)
Thank you very much, almost everything is OK, I just got a problem with question 8 :
"In my edit dialog, I have the edit button. When I click this button, is it possible to directly save the modifications ?
I do not want to open another dialog to edit the datas, since I can already do it in the first dialog ?"
In fact, I don't retrieve the datas that have been changed.
the "ChangedRecord" does not give me the new information that I have selected in the dialog.
For instance, I have an event with user "Marie Louise" (user_id 12) and service "Cours dressage" (service_id 2).
When I select the event, I change the datas and select user "Chrissy" (user_id 13) and service "Cours CSO" (service_id 3).
When I click the edit icon to save my datas, I opened the console, and here is what I get :
As you can see, I don't retreive my new datas, I still have the old ones.
=> How can I do to get the new datas I selected and not the old ones ?
= >And just a little "extra" : How can I get "Chrissy" and "Cours CSO" at the left of the dropdownlist, not in the middle of it ?
The code is in my ScheduleTemplate.vue file.
Thank you in advance :)
Attachment: code_cdd91e83.zip
Thank you so much, it works perfectly I can get my new datas when I edit an event :)
i'll check for the value Template later and get back to you if needed .
Dear support,
In fact There is a little bug still. When I use this code :
The problem is now that the code is executed whenever the dialog is closed. So if I change some datas but change my mind and close the dialog without wanting to save anything, it triggers the event anyway and save the datas.
How can I execute your code only when I click on the "edit" icon ?
I tried this code :
But it does not work everytime. The very first time I click on an event, it does not work ("scheduleObj.currentAction" is null. Then, if I click one more time on the same event, it works ( "scheduleObj.currentAction" has value "EditSeries")
=> Moreover, I did not understand the role of the onActionBegin function ? is it possible to explain it to me ?
=> And last, I want my dropdownlist "client" to be "required".
How can I do that, and show a red message " Le client est obligatoire" just below the field if it is empty when I save the datas ?
Best regards !
|
//FormValidator rule is added for required fields
const options = {
rules: {
EmpName: { required: [true, "Le client est obligatoire"] },
},
};
// defines FormValidator to validate the quickinfo fields
let formObject = new FormValidator("#form-element", options);
// validates the fields
if (!formObject.validate()) {
return;
} |
Kindly refer to the above solution and let us know if you need further assistance.
We suggest you to replicate your problem in the shared sample and share the issue replication steps with video demo to validate the issue and provide the solution promptly.
=> I am not sure to understand what you want me to do ?
The problem is in this part of my code :
If I have an event, and want to edit datas. So I click on the "edit" icon, that is supposed to save my datas.
===> When I take a look at my debug console, I can see that "scheduleObj.currentAction" is NULL.
So I can't save my new datas since the condition if(scheduleObj.currentAction === "EditSeries" is not true .
This happens ONLY when I click on the "edit" icon of any event for the 1st time.
However, if I click for the second time on an event, and try to save the datas, then scheduleObj.currentAction value is not null anymore, so the condition if(scheduleObj.currentAction === "EditSeries" is OK, and I can save my datas.
You can see the code in my zip file, in the scheduleTemplate.vue, onPopUpClose method.
About question 3, I tried to add your validation code :
When I left the customerField Empty, I have this error :
Can you help me ?
Best regards,
Attachment: code_e0293ea4.zip
"So we request you to share runnable issue replicating sample"
=> No problem, how can I do that ?
Di you want me to put my code in one of your online sample ?
Thank you very much, I am going to do so.
Can you just tell me : When you create an event, is it possible to show something like a spinner (any kind of loading animation) between the moment you click on "save" and the moment the new event appears in the scheduler ?
I am asking you that because some people have low connections (2G/3G), so a spinner could keep them waiting
Thank you very much, the spinner works ! Is it possible to customize it / make it more visible ?
- 18 Replies
- 4 Participants
-
SB Sandra Bordier
- Jul 17, 2021 03:49 PM UTC
- Aug 16, 2021 07:45 AM UTC