Stop Enter from saving.

Hello,

I am using the latest version of dhtmlxScheduler on a wordpress website, I need to know if there is a way to stop the enter key from saving the event? Usually when people are entering event information they would hit enter to goto the next line, is there a way to stop it from saving?

Thanks.

You can add the next line

scheduler.keys.edit_save = some_key_code;

where some_key_code - code of key, which will be used for closing editor ( by default it is Enter - 13 )

Thanks.

Where am I adding this line?

You may add it into file scheduler_include.html:

<script>
scheduler.keys.edit_save = some_key_code;
</script>

Awesome.

It worked. Thanks for the assistance. :slight_smile:

Where do you get the key code values ( ie 13 = Enter)
What if I do not want any key to save - I tried using 0 or “” as the key code but then this causes a problem when you try to enter text in the standard edit function on the event on the calender. Any key then seems to close the edit fuction when using keys.edit_save=0

Where do you get the key code values ( ie 13 = Enter)
Those are standard char codes
cambiaresearch.com/articles/ … -key-codes

You can use -1 to disable the key.