Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add API for range setting #61

Merged
merged 5 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions examples/example05-using-range.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<head lang="en">
<meta charset="UTF-8">
<title>5. Using range</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<link rel="stylesheet" type="text/css" href="./css/tui-example-style.css" />
<link rel="stylesheet" type="text/css" href="../dist/tui-time-picker.css" />
</head>

<body>
<div class="code-html">
<table>
<tbody>
<tr>
<td><div id="timepicker-selectbox-meridiem"></div></td>
</tr>
<tr>
<td><div id="timepicker-spinbox"></div></td>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript" src="../dist/tui-time-picker.js"></script>
<script type="text/javascript" class="code-js">
var tpSelectboxMeridiem = new tui.TimePicker('#timepicker-selectbox-meridiem', {
inputType: 'selectbox',
showMeridiem: true
});

var tpSpinbox = new tui.TimePicker('#timepicker-spinbox', {
inputType: 'spinbox',
showMeridiem: false
});

var begin = { hour: 6, minute: 20 };
var end = { hour: 11, minute: 15 };

tpSelectboxMeridiem.setRange(begin, end);

begin = { hour: 9, minute: 30 };
end = { hour: 18, minute: 40 };
tpSpinbox.setRange(begin, end);
</script>
</body>
</html>
Loading