drus40229 2010-06-28 16:10
浏览 24
已采纳

Jquery插件 - 日期选择器和crud(php mysql)

I am trying to find a date picker that can show dates to select starting current date so that the users don't select the past date and I need not worry about validating. I am not sure if this will show the correct date for any one from any place. I found some plugins but none of it has this option.

I found this http://jqueryui.com/demos/datepicker/#min-max but the restrict range option starts with 10-15 days before current date. I am expecting the date format to be 2010-06-28 as I have my other code on the site works based on this format.

I am trying to find a best example for php/mysql/jquery crud with these options After a user logs in, I want to show his/her current list of items with "delete item, update/modify item, add a new item. I have a page for the "add new item" so the user can be navigated to that page and he can add a new item by filling a name, date and some more info.

Please help me out. Sorry if I cannot post questions asking for info without giving any code examples.

regards

  • 写回答

1条回答 默认 最新

  • dongyan7876 2010-06-28 16:31
    关注

    The jQueryUI datepicker that you mentioned will do what you need it to. Set the options for the instance using the options below:

    $(document).ready(function() {
        $("#datepicker").datepicker({
            minDate: +0,
            dateFormat: 'yy-mm-dd'
        });
    });
    

    This will start the date options with today and format the date as you specified the format needed to be. All you need to do is make sure the selector is correct by setting the correct ID for the input field.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 mmocr的训练错误,结果全为0
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀