Questions tagged [datetime-local]

23 questions
2
votes
2 answers

Optional time in

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): How can I preload only…
Philip F.
  • 1,167
  • 1
  • 18
  • 33
2
votes
1 answer

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:
The Only Smart Boy
  • 578
  • 19
  • 39
2
votes
2 answers

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 allow. I will let a piece of code to see the differences.…
Alex Manea
  • 110
  • 8
1
vote
0 answers

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-selectable field sometimes users are omitting…
BATMAN_2008
  • 2,788
  • 3
  • 31
  • 98
1
vote
1 answer

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 time is 13:52. I have to select -2 hours. How can I remove…
Alex Manea
  • 110
  • 8
1
vote
1 answer

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

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 always suggested using MIN/MAX attributes. They…
Antony
  • 3,875
  • 30
  • 32
0
votes
1 answer

why when i add a datetime field i fail to submit my form in laravel

my code was working fine untill i added two datetime input fields,every time i click submit it says failed, the two columns in mysql database are datetime type a message in red displays on the top of the form "échec".the data not stored in…
0
votes
0 answers

why i'm getting The expire does not match the format d-m-y h:i:s A whenever i fill a datetime input field in laravel

whenever i try to fill in datetime field i get this error in red : The expire does not match the format Y-m-d\TH:i:s.How can i fix this? here is my code: validation rules 'dis' => 'required|date_format:Y-m-d\TH:i:s', 'expire' =>…
0
votes
0 answers

how can i set the datetime-local input so i can choose a datetime from the current date and onwards

i want to have an input feild where i can choose date and time in the future from the current date i tried lot of solutions but when i try to choose a datetime it's giving me to choose between a time range witch i don't want ,i want to choose the…
0
votes
0 answers

HTML datetime-local input field, not being able to select time

Some background - I've got a MEAN stack timesheet application that I'm hosting on my local network on Apache server and accessing on different machines connected to the network. The machines are not connected to the internet. There's a…
0
votes
0 answers

How to display minutes with 15mins interval

In this case, I would like to change the time interval to every 15min, like 1:00,1:15,1:30,1:45 in the right hand side selection part. which will display 00,15,30,45 only instead of 30,31,32 like shown in the photo. The step="900" attribute does not…
0
votes
1 answer

Setting input type='datetime-local' value and min attribute in useForm

I know that you can set defaultvalues inside useForm hook and reset it by reset() from 'react-hook-form'. But I'm not able to set value and min attribute to new Date() so that each time when form opens, there is updated value. For simplicity, assume…
0
votes
0 answers

Why is datetime-local failing to validate the value in google chrome?

I recently updated chrome browser and all of a sudden the datetime-local input type is failing to validate. I keep receiving the following warning. Image with the warning I mention that input properties are set correctly. image with the input html…
1
2