English 中文(简体)
日期 cker 正确格式
原标题:Datepicker formatting correctly

ok so i have a datepicker and the initial state is like this Jul. 21, 2010 but when i pick a date i get this format 07/21/2010 how do i get it so when i select the date from the datepicker it goes back to this format Jul. 21, 2010

我的法典

<p class="left search_date"><%= text_field_tag "tee_date", @date.strftime( %b. %d, %Y ), :size => 9 if @date %><span class="search_tip">(Change)</span></p>                                                          

    <script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
  $("#tee_date").datepicker();
    var tee_date = $("#tee_date").datepicker({ maxDate:  +1y , minDate: new Date() });
    $(".search_tip").click(function(){
        tee_date.datepicker("show");
    });
  });
</script>
最佳回答

仅添加以下参数: M d,yyy , 当你打电话给日期。

var tee_date = $("#tee_date").datepicker({ maxDate:  +1y , minDate: new Date(), dateFormat:  M d,yy  });
问题回答

暂无回答




相关问题
DatePicker minDate relative 1 month from start date

How do I set the #endDatePicker 1 month to the future of the selected date from #startDatePicker? I am not figuring this one out but I am sure it is easier than I am making it. Here is what I am ...

datepicker in JQuery UI Dialog shows calendar on dialog open

I have a JQuery modal dialog with 2 JQuery UI datepicker inputs. My problem is that when the dialog opens the calendar is already open on the page. I am not sure if this is because it is getting focus ...

jQuery datepicker to prevent past date

How do I disable past dates on jQuery datepicker? I looked for options but don t seem to find anything that indicates the ability to disable past dates. UPDATE: Thanks yall for the quick response. I ...

Silverlight DatePicker in DataGrid allow NULL dates

I have a DataGrid that has as one of its columns a DatePicker (for the editing template). Is there a way to keep this but still allow a user to enter in a NULL date?

How to reset a field when changing a date ui.datepicker.js

I m using ui.datepicker.js I have a form and when the date is changed I want that another field reset the status (this field is a dropdown select box). The case is the following: The user enter the ...

Not finding defaultDate in jQuery UI datepicker

I have a form text field that pulls a date from a database (in the format yyyy-mm-dd). <input class="" type="text" name="closingDate" id="closingDate" value="<?php echo $closingdate;?>" />...

热门标签