Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (51 sloc) 1.53 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 dependency files

  • Script - tui-code-snippet 1.5.0 or later
  • Script - tui-dom 3.0.0 or later

    If your project should support IE8, please use tui-dom.js, not tui-dom.min.js.

<html>
    <head>
        ....
        <link href="tui-time-picker.css" rel="stylesheet">
    </head>
    <body>
        ....
        <script type="text/javascript" src="tui-code-snippet.min.js"></script>
        <script type="text/javascript" src="tui-dom.min.js"></script>
        <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

You can’t perform that action at this time.