Problem discovery:
After the project went online, I suddenly found a problem with the sub-page of the backend management system layui. The time control crashed and the time could not be selected.
Cause analysis:
If a page appears and finds multiple nodes, only the first node can be used normally and the subsequent nodes will crash. It can be understood that currently laydate does not support multiple renders at one time. node. It's not a matter of duplicate instances, because the instances I create for each page are different and it still crashes. In the background management system, this kind of parent-child page does have multiple pages that use time controls, thereby rendering multiple nodes.
Solution:
The default configuration in the laydate file, trigger: 'focus' //The focus of the event of the callout control is changed to click.
The test deployment is effective online.
Related recommendations: layui tutorial
The above is the detailed content of How to solve the layui time control crash problem. For more information, please follow other related articles on the PHP Chinese website!