Ограничить возврат ввода type = "date" только для отображения указанной даты? - PullRequest
1 голос
/ 27 марта 2020

Я отображаю значение для разных дат, но возвращаемое значение равно «Суббота, 09 мая 2020 г., 02:00:00 по Гринвичу + 0200 (Центральноевропейское летнее время)», и я хотел бы ограничить перенастроенное значение на « Суббота 09 мая 2020 года ». Кто-нибудь сталкивался с такой же проблемой раньше?

Вот мой html:

<form method="POST">
    <div class="newevent-form">
        <label for="nameOfEvent">Event Title</label>
        <input type="text" id="title" name="title" class="form-control">
        <label for="locationOfEvent">Location of the event</label>
        <input type="text" id="location" name="location" class="form-control">
        <label for="dateOfEvent">Date of the event</label>
        <input type="date" id="date" name="date" class="form-control" min="2020-01-01" max="2050-12-31">
        <label for="timeOfEvent">Starting time of the event</label>
        <input type="time" id="time" name="time" class="form-control" min="06:00" max="24:00">
        <small>Events can be scheduled between 6AM and 12AM</small>
        <button type="submit"> Create New Event </button>
    </div>
</form>
...