「jQuery入門」datepickerの日付フォーマットをyyyy/mm/ddに変更する方法

1.datepickerのHP

Datepicker


CSSコード
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
JSコード
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

2.サンプル
<script type="text/javascript">
$(function() {
$(“#birthday").datepicker();
$('#birthday’).datepicker(“option", “dateFormat", 'yy/mm/dd’ );

});
</script>
<label>誕生日:<input type="text" id="birthday"></label><br/>

jQuery

Posted by arkgame