【发布时间】:2014-11-20 10:18:13
【问题描述】:
我使用 jQuery UI Datepicker 为日期范围创建了一个表单。
<form action="activity_report_date_range.php" method="GET" name="search_reporting" id="search_reporting"><br />
<label for="from">Start Date:</label><br>
<input type="text" id="from" name="from"><br><br>
<label for="to">Last Date:</label><br>
<input type="text" id="to" name="to">
<input style="margin-bottom: 20px" type="submit" name="submit_search" id="submit" value="Search" placeholder="Submit">
</form>
我正在使用 Google 托管的 jQuery UI。一切似乎都正常,但我想用破折号而不是正斜杠来格式化日期。
例如,
我希望将日期输入为:2014-11-05 (Y-m-d),而不是当前正在填充的日期,11/05/2014
我正在寻找“破折号”和日期格式 y-m-d。好像拿不到这是一个jsfiddle:
【问题讨论】:
标签: javascript jquery jquery-ui datepicker