- begins to think that
inputwill bindblurevents, but the user"s click time control is also ablurevent that triggersinput, which is not feasible .
- guess that it may be a
clickevent bound todocument. At this time, check whetherevent.targetcontainsclassofbootstrap, but think that datepicker should not have a fixedclassfor every element.
The - guess will use the
containesmethod, such as binding theclickevent ofdocumentto determine whether the currently clickedeventis in the topclassofdatapicker. - set up a
masklayer on the page, the background is transparent, and thez-indexvalue is smaller thandatepicker. When you click on other areas of the page, you click on themasklayer, and then the time control is hidden. But the user does not know that this is clicking on the transparent layer, and when clicking on other operable areas, the user will find that the click does not respond (because it is hiding the time control and hiding the transparent layer operation), and on the second click, the transparent layer has been removed before you can click on other actions. So this scheme will also have disadvantages
would you like to ask if there is any better way
