JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Scheduler How to manipulate an event before it gets saved to the localstorage Reply To: How to manipulate an event before it gets saved to the localstorage

#103421

Hi,

Can you explain what are you trying to achieve?
You can edit the event object in the itemChanging event.
This event is triggered when an Event is GOING to be updated/inserted/removed. This event allows to cancel the operation by calling event.preventDefault() in the event handler function.
event.detail.type contains the type of the operation. You can use this to check if it is ‘inserting’.
event.detail.item contains the event object that you can manipulate.

 

Please explain your situation so we can help you!

 

Please have a look at this demo to see how to hide any datafield in the modal: codepen
Basically, the event object from the editDialogOpen event contains all the editors in ‘event.detail.editors’.
From there you can get any editor you want and apply a class ‘smart-hidden’: ‘notificationsEditor.classList.add(‘smart-hidden’);’

Best Regards,
Svetoslav Borislavov

Smart UI Team
https://www.htmlelements.com/