BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi guys,
I have Custom Editor Window , so I am using method:
editorTemplate={editorTemplate.bind(this)}
By my logic from function editorTemplate I'm calling my component SchedulerPopUpEditor. Init is a few TimePickerComponent, ComboBoxComponent, DropDownListComponent ....... and RecurrenceEditorComponent.
<RecurrenceEditorComponent
ref={recurrObject}
id='RecurrenceEditor'
change={handleRepeaterChange.bind(this)}
dateFormat='dd/MM/yy'
frequencies = {['none', 'daily', 'weekly']}
minDate={new Date()}
selectedType='0'
></RecurrenceEditorComponent>
Everything works just fine, but when I create recurring event - only one, selected time from scheduler get filled with data, not selected time for tomorrow or any other date.
On other hand, if I don't use the Custom Editor Window everything works fine.
So I checked on your examples, and there is same problem, (I think this is a problem).
What is happened:
EVENT: Test Time Fields is created to be every day for the next 10 days in same time. But there is just one for selected time field.
Please check this link for this example and : https://ej2.syncfusion.com/react/documentation/schedule/editor-template/#how-to-add-recurrence-options-within-editor-template
What is expectation:
https://stackblitz.com/edit/4a3eli-fhvbrf?file=index.js
Can you give me some advice how to use the Custom Editor Window with RecurrenceEditorComponent and have that effect which will fill selected times in scheduler ?
Thank in advance, I hope that you can understand my explanation of the problem.
Cheers,
Sinisha
Hi Sinisa,
The popupClose event can help you solve this problem. You can set the editor recurrence rule value to the appointment field recurrence rule by using popupClose event args, as shown in the snippet below.
Sample: https://stackblitz.com/edit/react-g2twjs?file=index.js
[index.js]
function onPopupClose(args) { if (args.type === 'Editor' && args.data) { args.data.RecurrenceRule = args.element.querySelector('#RecurrenceEditor').ej2_instances[0].value; } } |
Regards,
Mugilraj G
Hi Mugilraj,
Thank you for your help.
How I see this will work, but when I implement this code, I got error :
Uncaught TypeError: endDate.getTime is not a function in event-base.js?450c:872 (file from @syncfusion npm package )
I will try to track this error, not sure why I got this but I will check.
Thank you again
Sinisa,
Sample: https://stackblitz.com/edit/ej2-react-schedule-editor-template-with-recurrence-opt?file=index.js
We have checked our shared sample at our end. But, we are unable to reproduce the issue on our end. We suspect that the appointment EndTime value is not a valid Date. So, we suggest you make sure the appointment EndTime field value is a valid Date. If you are still facing the same problem share the below details to proceed further.
Hi Ravikumar,
Thank you for your help, but I tried that - value was already in Date type, created with the new Date () function.
I trace data and for some reason, parent component with Scheduler component, receive through editorTemplate dates from child component with as string instead of date object, ad. Reason is simple, I was have idea to use just TimePickerComponent not DateTimePickerComponent (I didn't need to select date in my scenario ).
So all good, as always my mistake.
But at the end I decide to work on the build Editor window, and to do customisation with a build function and all it's working great ... for now.
Thank you for your help
Regards
Sinisa
Sinisa,
Please get back to us if you need any other assistance.