jquery外掛程式datepicker

來源:互聯網
上載者:User

標籤:

jQuery UI很強大,其中的日期選擇外掛程式Datepicker是一個配置靈活的外掛程式,我們可以自訂其展示方式,包括日期格式、語言、限制選擇日期範圍、添加相關按鈕以及其它導航等。

<script type="text/javascript" src="DatePicker/WdatePicker.js"></script>

</head>

<body>

    <form id="form1" runat="server">

    <div>

    開始日期不能大於結束日期,且都不能大於今天

    <input id="startDate" type="text" class="Wdate" onfocus="WdatePicker({maxDate:‘#F{$dp.$D(\‘endDate\‘)||\‘new Date()\‘}‘})" />

    <input  class="Wdate" id="endDate" readonly="readonly" onfocus="WdatePicker({minDate:‘#F{$dp.$D(\‘startDate\‘)}‘,maxDate:new Date()})" />

    </div>

    <div>

    限制日期的範圍是2015-3-8 11:30:00 到 2015-4-10 20:59:30

    <input type="text" class="Wdate" id="d38" onfocus="WdatePicker({skin:‘whyGreen‘,dateFmt:‘yyyy-MM-dd HH:mm:ss‘,minDate:‘2015-03-08 11:30:00‘,maxDate:‘2015-04-10 20:59:30‘})" value="2015-03-09 11:00:00" /> </div>

    限制日期的範圍是 2008年2月 到 2008年10月

   <input type="text" class="Wdate" id="d413" onfocus="WdatePicker({dateFmt:‘yyyy年M月‘,minDate:‘2008-2‘,maxDate:‘2008-10‘})"/>

   <div>

   年月日時分秒

   <input type="text" id="d241" onfocus="WdatePicker({dateFmt:‘yyyy年MM月dd日 HH時mm分ss秒‘})" class="Wdate" style="width:300px"/>

  

   星期, 月 日, 年

   <input type="text" id="d245" onfocus="WdatePicker({dateFmt:‘DD, MMMM d, yyyy‘})" class="Wdate"/></div>

    </form>

</body>

jquery外掛程式datepicker

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.