Skip to content
Advertisement

How to use date time picker in sweet alert?

This is my code i am working on

JavaScript

I want to set date time picker in the input inside sweet alert.

JavaScript

When i clicked on the sweet alert, the input field unable to click or do any action on it. The date also didnt show up. Anyone can tell me what’s wrong? Thanks.

Console error when click on input select date

JavaScript

Advertisement

Answer

Use onOpen listerner to trigger datetimepicker

JavaScript

In your case something like this:

JavaScript

Reference: https://sweetalert2.github.io/

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement