默认情况下如何在文本框中停止datetimepicker设置今天的日期 [英] How to stop datetimepicker setting todays date in textbox by default onclick

本文介绍了默认情况下如何在文本框中停止datetimepicker设置今天的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们选择日历图标时,它将自动将今天的日期设置为文本框. 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设置今天的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆