nhn / tui.date-picker

Component that selects specific date.

Home Page:https://nhn.github.io/tui.date-picker/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Timepicker broken | Uncaught TypeError: y is not a constructor

trymeouteh opened this issue · comments

Describe the bug

Timepicker example is broken.

To Reproduce

Steps to reproduce the behavior:

  1. Use example code or code below
<link rel="stylesheet" href="node_modules/tui-date-picker/dist/tui-date-picker.min.css">

<table style="width: 650px;">
    <thead>
        <tr>
            <td>
                <h3>Basic</h3>
            </td>
            <td>
                <h3>Tab style</h3>
            </td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <div class="tui-datepicker-input tui-datetime-input tui-has-focus">
                    <input type="text" id="datepicker-input" aria-label="Date-Time">
                    <span class="tui-ico-date"></span>
                </div>
                <div id="wrapper" style="margin-top: -1px;"></div>
            </td>
            <td>
                <div class="tui-datepicker-input tui-datetime-input tui-has-focus">
                    <input type="text" id="datepicker-input-2" aria-label="Date-Time">
                    <span class="tui-ico-date"></span>
                </div>
                <div id="wrapper-2" style="margin-top: -1px;"></div>
            </td>
        </tr>
    </tbody>
</table>

<script src="node_modules/tui-date-picker/dist/tui-date-picker.min.js"></script>

<script>
    var datepicker = new tui.DatePicker('#wrapper', {
        date: new Date(),
        input: {
            element: '#datepicker-input',
            format: 'yyyy-MM-dd HH:mm A'
        },
        timePicker: true
    });

    var datepicker2 = new tui.DatePicker('#wrapper-2', {
        date: new Date(),
        input: {
            element: '#datepicker-input-2',
            format: 'yyyy-MM-dd HH:mm A'
        },
        timePicker: {
            layoutType: 'tab',
            inputType: 'spinbox'
        }
    });
</script>
  1. Look at console and see errors. "Uncaught TypeError: y is not a constructor"

Expected behavior

Timepicker will work with no errors

Desktop (please complete the following information):

  • Linux Mint 21.1
  • Firefox 112.0b9
  • 4.3.3