amsul / amsul/pickadate.js

Two timepickers - set min in second from value in first

未關閉
#938 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
7.6k
分支
981
PR 合併指標
30 天內沒有已合併 PR

描述

I have two timepickers, start and finish. How would I go about setting the minimum time of finish to whatever was selected in the first + 15min? I'm guessing this has something to do with onset but Im not sure where to begin It would be nice to have the reverse true - if you set a finish_time the max of start time cannot be more than the value of finish - 15min. Thanks in advance!

` $('#start_time').pickatime({
//format: 'h:i A', // Displayed and application format
formatSubmit: 'HH:i:00',
hiddenName: true,
interval: 15, // Interval between values (in minutes)
min: '3:00 AM', // Starting value
max: '6:00 PM', // Ending value
});

$('#finish_time').pickatime({
//format: 'h:i A', // Displayed and application format
formatSubmit: 'HH:i:00',
hiddenName: true,
interval: 15, // Interval between values (in minutes)
min: '3:00 AM', // Starting value
max: '6:00 PM' // Ending value

});`

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。