Skip to content

Latest commit

 

History

History
57 lines (46 loc) · 1.14 KB

getting-started.md

File metadata and controls

57 lines (46 loc) · 1.14 KB

v2.0.0 Migration Guide

In v2.0.0, jQuery is removed. It might cause other components to fail if they pass a jQuery object as a container.

Previously, you can use a jQuery to create an instance.

// v1
var instance = new tui.TimePicker($('#timepicker-wrapper'), {
   // options
});

Now, you have to use selector or HTMLElement as a container.

// v2
var instance = new tui.TimePicker('#timepicker-wrapper', {
   // options
});

// or

var container = document.getElementById('timepicker-wrapper');
var instance = new tui.TimePicker(container, {
    // options
});

Load files

<html>
    <head>
        ....
        <link href="tui-time-picker.css" rel="stylesheet">
    </head>
    <body>
        ....
        <script type="text/javascript" src="tui-time-picker.min.js"></script>
        ....
    </body>
</html>

Write a wrapper element

<div id="timepicker-wrapper"></div>

Create instance

var instance = new tui.TimePicker('#timepicker-wrapper', {
   // options
});

You can see the detail information at the API & Examples