jquery datapicker

jquery datapicker

날짜 선택기 참고.

<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.11.4/themes/blitzer/jquery-ui.css">
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.3.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.11.4/jquery-ui.min.js"></script>
<script>
//Date Picker
$(function() {
  $( "#datepicker1, #datepicker2" ).datepicker({
    dateFormat: 'yy-mm-dd',
    prevText: '이전 달',
    nextText: '다음 달',
    monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
    monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
    dayNames: ['일','월','화','수','목','금','토'],
    dayNamesShort: ['일','월','화','수','목','금','토'],
    dayNamesMin: ['일','월','화','수','목','금','토'],
    showMonthAfterYear: true,
    yearSuffix: '년'
  });
});

#datepicker1, #datepicker2 등 엘리먼트의 id값으로 제어.

엘리먼트의 테마는 여기를 참조 : http://jqueryui.com/themeroller/

 

날짜와 시간을 동시에 선택하기

 http://zetawiki.com/wiki/JQuery_%EB%82%A0%EC%A7%9C%EC%8B%9C%EA%B0%84%EC%84%A0%ED%83%9D%EA%B8%B0_datetimepicker

Tags: