English 中文(简体)
我怎么能用地为 j子 Date子确定min子/顶点?
原标题:How can I set the minDate/maxDate for jQueryUI Datepicker using a string?

http://jqueryui.com/demos/datepicker/#option-minDate”rel=“nofollow noreferer”> 指出,可以采用“目前表格中的说明”确定排雷选择。 因此,我曾尝试过以下工作:

$("input.date").datepicker({ minDate: "01/01/2010", maxDate: "12/31/2010" });

然而,这一结果导致我的发照人从2015年6月11日至2015年12月12日之间有可选择的日期。

我检查了目前的日期表及其<代码>mm/dd/yy,该代码是指每月2位数、日2位数和年4位数,以斜线分开。 I ve还试图将dateFormat: “mm/dd/yyy”列入内分化说明。

I ve还检查了之后的微酸和最高数值,并将其调整适用于我希望的数值:01/01/201012/31/2010<>。

我想能够用地板/顶,因为我把这些价值观从其他地方传承。 也许有人会知道为什么会发生这种情况,以及如何解决这一问题,或者为了做到这一点而进行的工作,可能会改变日形或某点的形式?

增 编

EDIT: Using: jQuery v1.3.2 and jQuery UI v1.7.2

最佳回答

最后,我不得不使用这样的东西,因为第1.7号日期皮cker器没有日期证明:

$.getJSON("/GetMinMaxDates/", function(dates) {
    var DateLimits = {min:null, max:null};

    DateLimits.min = new Date(Date.parse(dates.min));
    DateLimits.max = new Date(Date.parse(dates.max));

    $("input.date").datepicker({ dateFormat: "mm/dd/yy", minDate: DateLimits.min, maxDate: DateLimits.max });
});
问题回答

1.3.2 和1.7.2中的“bug”一词。 1.4.2和1.8.1均罚款。

我认为,你的最后一种方法对E7/8来说是最好的。 IE在精心设计的日期运作中将NaN遣返回国;我一说问题已经消失。





相关问题
Simple JAVA: Password Verifier problem

I have a simple problem that says: A password for xyz corporation is supposed to be 6 characters long and made up of a combination of letters and digits. Write a program fragment to read in a string ...

Case insensitive comparison of strings in shell script

The == operator is used to compare two strings in shell script. However, I want to compare two strings ignoring case, how can it be done? Is there any standard command for this?

Trying to split by two delimiters and it doesn t work - C

I wrote below code to readin line by line from stdin ex. city=Boston;city=New York;city=Chicago and then split each line by ; delimiter and print each record. Then in yet another loop I try to ...

String initialization with pair of iterators

I m trying to initialize string with iterators and something like this works: ifstream fin("tmp.txt"); istream_iterator<char> in_i(fin), eos; //here eos is 1 over the end string s(in_i, ...

break a string in parts

I have a string "pc1|pc2|pc3|" I want to get each word on different line like: pc1 pc2 pc3 I need to do this in C#... any suggestions??

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...