Datepicker set min value with an event behaviour

Here is example of two related datepickers.

https://jsfiddle.net/simon10/5j3vrkbp/10/

First datepicker changes second datepicker min date. After few selections on second datepicker, dialog stays open and strange behaviour is noticed. As I can see there are two dialogs open for second datepicker. I would expect only one dialog. What do you think?

After some research I think that there must be a bug in AUI datepicker or inlineDialog component (cleaninig references to generated inlineCalendar dialogs probaly). I solved problem by recreating whole html tag.