问题描述
当我们选择日历图标时,它将自动将今天的日期设置为文本框.datetimepicker()函数中是否有任何参数/选项可以设置为false或null,以防止datetimepicker()默认将今天的日期设置为文本框.如果某人未从日历中选择任何日期,则文本框应为空,而不是使用datetimepicker()设置今天的日期.
When we select calendar icon, it automatically sets today's date to textbox.Is there any parameter/option in the datetimepicker() function which can be set to false or null preventing datetimepicker() setting today date to textbox by default.If someone doesn't select any date from calendar the textbox should be empty rather than having today's date set by datetimepicker().
推荐答案
值得阅读文档.初始化datetimepicker时,请更改useCurrent
属性.
Worth reading the docs. Change the useCurrent
attribute when initailizing the datetimepicker.
https://eonasdan.github.io/bootstrap-datetimepicker/Options/#使用电流
这篇关于默认情况下如何在文本框中停止datetimepicker设置今天的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!