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

Timepicker broken | Uncaught TypeError: y is not a constructor #121

Open
trymeouteh opened this issue Apr 4, 2023 · 0 comments
Open

Timepicker broken | Uncaught TypeError: y is not a constructor #121

trymeouteh opened this issue Apr 4, 2023 · 0 comments

Comments

@trymeouteh
Copy link

trymeouteh commented Apr 4, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant