开发者

Jquery Plugins - date selector and crud(php mysql)

开发者 https://www.devze.com 2023-01-05 11:40 出处:网络
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 sh

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号