Java

jQuery Timepicker

우오우어아오앙 2021. 11. 23. 16:10
728x90
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js"></script>

 

jQuery Timepicker

jQuery Timepicker is a plugin to help users easily input time entries. It can parse the most used time representations allowing you and your users to enter time using their prefered way for writing it. Also, if writing is not your thing, you can also choos

timepicker.co

반응형
기본적인 사용법
$('.timepicker').timepicker({
    timeFormat: 'h:mm p',
    interval: 60,
    minTime: '10',
    maxTime: '6:00pm',
    defaultTime: '11',
    startTime: '10:00',
    dynamic: false,
    dropdown: true,
    scrollbar: true
});

 

동적으로 옵션 주기

minTime, setTime 대/소문자 주의
option안의 값 주의

$('#startDateTimepicker').timepicker('option', 'minTime', 14:00);
$('#startDateTimepicker').timepicker('setTime', 18:00)

 

728x90
반응형