开发者

how to change dateformat of jquery Datepicker

i'm using the jquery 1.5.1 and 1.8.11 jQueryUI and i'm getting a very strange problem. i've tried a lot of things and the behaviour seems to be just the same.

what happens if that i whant to get my date addoring the "yy-mm-dd" format according the documentation. but, as all the examples i use the tipical code (below) and when i start writing the date on the textbox, i cannot type some thing like '2011-03-22' because when i type the first 2(of day) the widget assumes automatically开发者_如何转开发 the 02 value.

$("#txtDTPicker").datepicker({
    altField: "#lblPkr",
    altFormat: 'yy-mm-dd',
    dateFormat: 'yy-mm-dd',
    showOtherMonths: true,
    selectOtherMonths: true,
    showOn: "button",
    buttonImage: "/images/calendar_icon.gif",
    buttonImageOnly: true
});

Does anyone have an idea how to solve this? what i whant is just write my date on the format 'yy-mm-dd' without the datepicker decide for me what i should have on the textbox?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜