Solve the problem of using time control LayDate in failed

Today, there is a need. When the user enters the page, pop up a pop-up window, select a time in the pop-up window, the pop-up window is probably like this:

My The idea is to write the contents of the pop-up window first, then use the to set content: 解决在layer.open中使用时间控件laydate失败的问题

  Layer.Open ({Content: $ ("# layout"). HTML (), Success: function () {layerdate ({"ELEM": "#time"});}}); 
Executed, find that the time control is not coming, that is, LayDate is invalid under this way of writing. Then I found a post on the official website, put Content: $ ("# layout"). HTML () changed to Content: $ ("# layout"), the surprise finds really, the effect is as follows:

The effect is achieved, but what is the ghost of the top [Object Object]?


At first, the top [Object Object] is hidden through CSS, but it always feels very awkward. Then after a toss, it is found that as long as the type of the lower layer is a page layer, it can be perfectly solved:

Layer.Open ({Layer: 1, Content : $ (“# layout”). HTML (), successdate: function () {laydate ({“ELEM”: “#time”});}});

  Note: The versions used are layer3.x.x., Laydate1.x.x, and other versions can be set directly when they are not tested.  
The above solves the problem of using time controls in Layer.Open is the full content of Xiaobian sharing to everyone. I hope I can give you a reference, I hope everyone will support Tumi Cloud.
© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment