Ticket #5679 (closed feature: fixed)

Opened 4 years ago

Last modified 23 months ago

Datepicker should reinitialize if dpDiv is removed

Reported by: pifantastic Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.datepicker Version: 1.8.1
Keywords: initialized haspatch Cc:
Blocking: Blocked by:

Description

The Datepicker is only initialized once, meaning, the widget container div is only added to the DOM once. However, if you delete that container, either directly or through something like $("body").html(""), no future datepickers will work.

Here is a workaround

 http://github.com/pifantastic/jquery-ui/commit/f48de0ad33a7f847a8514c989531fef46a57dbd7

Change History

comment:1 Changed 3 years ago by salnikov

comment:2 Changed 3 years ago by salnikov

Made an addition to prevent multiple event bind on initialize. New pull request sent  https://github.com/jquery/jquery-ui/pull/543. New commit is here  https://github.com/bardt/jquery-ui/commit/f20486d1231fce4a559bc70f0595a071e9efc59b

comment:3 Changed 2 years ago by scott.gonzalez

  • Type changed from enhancement to feature

comment:4 Changed 2 years ago by scott.gonzalez

  • Milestone changed from TBD to 1.11.0

comment:5 Changed 2 years ago by mikesherov

  • Keywords haspatch added
  • Status changed from new to open

comment:8 Changed 23 months ago by Roman Salnikov

  • Status changed from open to closed
  • Resolution set to fixed

Datepicker: reinitialize datepicker if mainDiv isn't on the page. Fixed #5679 - Datepicker should reinitialize if dpDiv is removed

Changeset: 7ffcaa2e3b673e7e4178293224d5a15f65cbbcf9

comment:9 Changed 23 months ago by mikesherov

  • Milestone changed from 1.11.0 to 1.10.0
Note: See TracTickets for help on using tickets.