25 questions
3 votes
2 answers
2k views
Optional time in <input type="datetime-local" required>
It is possible to set a default value for the time only or make the time optional for a datetime-local input (see this article as reference: MDN web-docs): <input type="datetime-local" value="...
2 votes
2 answers
4k views
Clear datetime-local with required
I have a problem with datetime-local picker in HTML5. I want to clear the datetime with the clear button, but this is not possible because the "required" function inside the input will not ...
2 votes
1 answer
1k views
JavaScript Date UTC datetime-local
I have a form where user can set a date and time with input format datetime-local. When the form is submitted an error appears for the start-date "Value must 11:52 AM or earlier". My local ...
2 votes
1 answer
2k views
Setting default value for a datetime-local input field in Blade
I would like to set the value of an input:datetime-local field in Blade with data from the database but it only shows a blank placeholder values. Below is my attempt which is not working: <input ...
2 votes
2 answers
260 views
How can you integrate datalist with datetime-local
I am trying to create an html datetime-local field which tells the user they can only pick from certain dates. Previous answers (such as this one - Disable certain dates from html5 datepicker) have ...
1 vote
1 answer
136 views
Preselect value for minutes in datetime-local HTML
I need to select date from datetime-local, but I want the minutes to be preselected as '00' Like: mm/dd/yyyy --:--:00 So that if the user selects a date-time, minutes will always be set to 00. My HTML ...
1 vote
2 answers
1k views
How to set default value for Input fields of datetime-local type created dynamically using Vuejs/Nuxtjs?
I am creating a few input fields of type datetime-local in Vuejs/Nuxtjs dynamically. I would like to set the default value for all these input fields as 2022-04-21T14:27:27.000. How to do it? For the ...
1 vote
0 answers
759 views
How do I map a `datetime-local` form control value to an epoch time property and back in Angular Reactive Forms?
I have an underlying data object that represents a timestamp property as a number representing milliseconds since Epoch. export class Activity { constructor( public timestamp: number=...
1 vote
0 answers
113 views
How to check if the DateTime matches the required format while using HTML DateTime-Local
I am developing a web application in which I have multiple HTML fields of type datetime-local. Users should provide the value for this in the following format: 2022-04-01T14:44:53 Since it is a user-...
1 vote
1 answer
31 views
Selecting a specific day between two inputs
I have two inputs. I want to limit date ranges to 3 days. Once selected, other dates will become inactive. How can I do?
0 votes
1 answer
2k views
Nuxtjs/Vuejs set the default date time as current date time for the input field of type datetime-local
I have a Nuxtjs/Vuejs application that contains the input field of type datetime-local. For this field, I would like to add the current DateTime as the default value. I have done similar things in ...
0 votes
1 answer
141 views
Safari datetime-local form validity bug after unsetting value
Using the following form in Safari, if you set a date and then use the "clear" button to unset it, Safari will invalidate the form even though it's valid. It also doesn't assign the input ...
0 votes
2 answers
111 views
Create input for open booking times?
I am looking for ideas how to create and/or fill workday times in Laravel Blade. At this moment I end up by: current code <input type="date" name="date"> <li class="list-group-item"> &...
0 votes
0 answers
22 views
datetime-local styling menu list
I am using an HTML <input type="datetime-local"> in my React app. I want to customize the dropdown menu that appears when the input is focused — specifically the calendar and time ...
0 votes
0 answers
228 views
HTML form input "datetime-local" value missing seconds when picker seconds set to zero
I have a datetime-input in a HTML form with step="1". It correctly shows the seconds in the UI and when the user opens the picker, they can select seconds. However, when retrieving the value ...