olton / Metro-UI-CSS

Impressive component library for expressive web development! Build responsive projects on the web with the first front-end component library in Metro Style. And now there are even more opportunities every day!
http://metroui.org.ua/
MIT License
7k stars 1.97k forks source link

Dynamically changing "data-exclude" creates weird behaviour #1858

Open kunambi opened 2 years ago

kunambi commented 2 years ago

Describe the bug

When using calendarpicker and trying to dynamically update the data-exclude option, it doesn't clear previously excluded dates.

To Reproduce

<input data-exclude="2022-06-25" type="text" name="date_start" data-role="calendarpicker" id="id_date_start" data-role-calendarpicker="true">

Later, through javascript, changing the data-exclude attribute to

<input data-exclude="2022-06-26" type="text" name="date_start" data-role="calendarpicker" id="id_date_start" data-role-calendarpicker="true">

Now both dates are excluded instead of only the 26th of June. This happens with data-role="calendar" too.

Expected behavior

I expected that the previously excluded date would be selectable after the change.

Desktop (please complete the following information):

xscode-auto-reply[bot] commented 2 years ago

Thanks for opening a new issue. The author has been notified and will review it as soon as possible. For urgent issues and priority support, visit https://xscode.com/olton/Metro-UI-CSS or Patreon