# How to select time with day in calendar

**URL:** <https://www.phphelp.com/t/how-to-select-time-with-day-in-calendar/35468>\
**Category:** Javascript & Ajax\
**Created:** [June 2, 2023, 9:40am UTC](https://www.phphelp.com/t/how-to-select-time-with-day-in-calendar/35468 "2023-06-02T09:40:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adem](https://www.phphelp.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@Adem](https://www.phphelp.com/u/Adem)\
**Post date:** [June 2, 2023, 9:40am UTC](https://www.phphelp.com/t/how-to-select-time-with-day-in-calendar/35468/1 "2023-06-02T09:40:14Z")

</div>

Hello,

How do I make the hours, minutes and seconds are selected when I select the dates I have specified in the calendar?

 ![Ekran görüntüsü 2023-06-02 124152](https://www.phphelp.com/uploads/default/original/2X/5/5567ada41742f798560c75e95711da4548ef991b.png)  
2023-02-15 10:20:15  
I want the hour, minute, and second here to be selected

```auto
flatpickr(".calendar", {
	disableMobile: "true",
	allowInvalidPreload: "true",
	allowInput: true,
	dateFormat: "Y-m-d H:i:s",
	enableTime: true,
	time_24hr: true,
	minDate: "2023-06-02 14:35:30",
	enable: ["2023-06-02 14:35:30","2023-05-18 13:36:07","2023-05-09 13:36:49","2022-12-14 13:54:54","2022-12-06 21:04:57","2022-11-15 17:34:05","2022-11-10 20:54:20"],
	maxDate: "2022-11-10 20:54:20",
	locale: {
	firstDayOfWeek: 1,
	weekdays: {
	longhand: ['Pazar', 'Pazartesi','Salı','Çarşamba','Perşembe', 'Cuma','Cumartesi'],
	shorthand: ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt']
	},
	months: {
	longhand: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran','Temmuz','Ağustos', 'Eylül','Ekim','Kasım','Aralık'],
	shorthand: ['Oca','Şub','Mar','Nis','May','Haz','Tem','Ağu','Eyl','Eki','Kas','Ara']
	},
	today: 'Bugün',
	clear: 'Temizle'
	}
});

```

---

<div class="post-metadata">

**Author:** ![katsry](https://www.phphelp.com/letter_avatar_proxy/v4/letter/k/2bfe46/32.png) [@katsry](https://www.phphelp.com/u/katsry)\
**Post date:** [July 31, 2023, 8:02pm UTC](https://www.phphelp.com/t/how-to-select-time-with-day-in-calendar/35468/2 "2023-07-31T20:02:00Z")

</div>

```auto
   flatpickr(".calendar", {
        disableMobile: "true",
        allowInvalidPreload: "true",
        allowInput: true,
        dateFormat: "Y-m-d H:i:s",
        enableTime: true,
        time_24hr: true,
        minDate: "2022-11-10 20:54:20",
        enable: [
            "2022-11-10 20:54:20",
            "2022-11-15 17:34:05",
            "2022-12-06 21:04:57",
            "2022-12-14 13:54:54",
            "2023-05-09 13:36:49",
            "2023-05-18 13:36:07",
            "2023-06-02 14:35:30"
        ],
        maxDate: "2023-06-02 14:35:30",
        locale: {
            firstDayOfWeek: 1,
            weekdays: {
                longhand: ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi'],
                shorthand: ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt']
            },
            months: {
                longhand: ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül',
                    'Ekim', 'Kasım', 'Aralık'
                ],
                shorthand: ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara']
            },
            today: 'Bugün',
            clear: 'Temizle'
        }
    });
  

```

Change the dates in the `enable` , `minDate` , and `maxDate` options according to your own needs.

---

<div class="post-metadata">

**Author:** ![Adem](https://www.phphelp.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@Adem](https://www.phphelp.com/u/Adem)\
**Post date:** [August 1, 2023, 6:13am UTC](https://www.phphelp.com/t/how-to-select-time-with-day-in-calendar/35468/3 "2023-08-01T06:13:25Z")

</div>

I don’t quite understand what you mean here.  
What I want to do is when I select one of the dates in “enable:”, I also want it to be selected in hours, minutes and seconds, but the year, month, and day are selected ok, but the hour, minute, and second are different
