resetLightbox() onAfterLightbox breaks recurring option

Hello,

I’ve noticed that calling resetLightbox() triggered by onAfterLightbox when using recurring events breaks the recurring event section of the lightbox. Steps to reproduce:

  1. Setup a calendar with recurring event extensions and add:

scheduler.attachEvent("onAfterLightbox", function(){ scheduler.resetLightbox(); });

  1. Start creating new event to open lightbox - click enable next to repeat event section, see that radio buttons for daily/weekly/monthly change the middle part of lightbox for recurring schedule options.

  2. Click cancel.

  3. Start creating another new event without refreshing browser so new lightbox opens - click enable next to repeat event section, now changing radio buttons don’t do anything.

  4. Refresh page, repeat step 2, radio buttons work.

  5. Comment out scheduler.resetLightbox(); line, repeat steps 1-4, notice that step 4 now works.

Can anyone else confirm this? Is there a workaround?

Yep, problem confirmed.
As quick solution, alter your code as

var original = scheduler.form_blocks["recurring"].set_value;
scheduler.attachEvent("onAfterLightbox", function(){
	scheduler.resetLightbox();
	scheduler.form_blocks["recurring"].set_value = original;
});