I'm currently utilizing the date and time picker from . However, I need some assistance with the current setup. Currently, the date and time pickers are in separate input fields. In order to select a date, I have to click on the Date input field, and for choosing a time, I need to click on the time input field.
What I really want is to have a single input field for both date and time selection. When I click on this one input field, it should automatically load the date picker by default. After selecting a date, it should seamlessly transition to the time picker for selecting the time as well. The output displayed in the input field should look like this: "29 Apr, 2019 at 14:00"
Is there anyone who can assist me in achieving this?
// Initialize DatePicker
$('.datepicker').pickadate({
format: 'dd mmm, yyyy',
today: '',
clear: '',
close: '',
});
// Initialize TimePicker
$('.timepicker').pickatime({
clear: '',
format: 'HH:i'
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://hateable-tests.000webhostapp.com/classic.css" rel="stylesheet">
<link href="https://hateable-tests.000webhostapp.com/classic.date.css" rel="stylesheet">
<link href="https://hateable-tests.000webhostapp.com/classic.time.css" rel="stylesheet">
<script src="https://hateable-tests.000webhostapp.com/picker.js"></script>
<script src="https://hateable-tests.000webhostapp.com/legacy.js"></script>
<script src="https://hateable-tests.000webhostapp.com/picker.date.js"></script>
<script src="https://hateable-tests.000webhostapp.com/picker.time.js"></script>
<input type="text" class="datepicker">
<input type="text" class="timepicker">