如何在日期选择器中不允许回溯日期 [英] How to disallow back date in date picker

查看:63
本文介绍了如何在日期选择器中不允许回溯日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何禁止从日期选择器返回日期.

预先感谢.

Hi,

How to disallow back date from date picker.

Thanks in advance.

推荐答案

亲爱的卡皮尔,

请执行以下操作:-

Dear Kapil,

Do the following:-

DateTimePicker1.MinDate = Today



谢谢



Thanks


确保在head 标签
中添加以下js和css文件
Make sure you add the following js and css files within your head tag
*jquery-1.4.1.min.js
*jquery.ui.core.js
*jquery.ui.datepicker.js
*jquery-ui-1.8.8.custom.css


现在使用以下代码:


Now use the following code:

<script type="text/javascript">


(function(){ var date = new Date(); var currentMonth = date.getMonth(); //这个月 var currentDate = date.getDate(); //当前的日期 var currentYear = date.getFullYear(); //今年
(function () { var date = new Date(); var currentMonth = date.getMonth(); // current month var currentDate = date.getDate(); // current date var currentYear = date.getFullYear(); //this year


这篇关于如何在日期选择器中不允许回溯日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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