# Popup Calendar - Removing seconds

**URL:** <https://forum.inductiveautomation.com/t/popup-calendar-removing-seconds/17022>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [February 16, 2018, 9:59pm UTC](https://forum.inductiveautomation.com/t/popup-calendar-removing-seconds/17022 "2018-02-16T21:59:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjcostel](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mjcostel](https://forum.inductiveautomation.com/u/mjcostel)\
**Post date:** [February 16, 2018, 9:59pm UTC](https://forum.inductiveautomation.com/t/popup-calendar-removing-seconds/17022/1 "2018-02-16T21:59:50Z")

</div>

I am working with several popup calendar components and want to remove the seconds portion. I have the Format string set as yyyy-MM-dd HH:mm and that shows up how I like. However when click the down arrow to launch the calendar, the seconds are there. Is it possible to customize the component in this way?

I am using this as part of a data entry form and the customer would rather not have to deal with the seconds.

Thanks

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [February 17, 2018, 3:39am UTC](https://forum.inductiveautomation.com/t/popup-calendar-removing-seconds/17022/2 "2018-02-17T03:39:00Z")

</div>

There is the “Show Time” property of the Popup Calendar, does setting that to false solve your issue? I can’t pull up Ignition atm to check myself.

Failing that, you could always just set the seconds to zero when you parse it for the data entry…

---

<div class="post-metadata">

**Author:** ![mjcostel](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mjcostel](https://forum.inductiveautomation.com/u/mjcostel)\
**Post date:** [February 19, 2018, 1:24pm UTC](https://forum.inductiveautomation.com/t/popup-calendar-removing-seconds/17022/3 "2018-02-19T13:24:20Z")

</div>

Setting “Show Time” to false removes hours minutes and seconds from the popup. I still need the Hours and minutes.

Thanks,

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [February 19, 2018, 9:26pm UTC](https://forum.inductiveautomation.com/t/popup-calendar-removing-seconds/17022/4 "2018-02-19T21:26:57Z")

</div>

I’d either get rid of the seconds when you need to read the value (when the user hits submit?) or right when they change the date.

You can put this in the PUC propertyChange event script:

```auto
if event.propertyName == 'date':
	date = event.newValue
	seconds = system.date.getSecond(date)
	event.source.date = system.date.addSeconds(date, -seconds) 

```

---

<div class="post-metadata">

**Author:** ![mmcpartland](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@mmcpartland](https://forum.inductiveautomation.com/u/mmcpartland)\
**Post date:** [July 22, 2019, 3:38pm UTC](https://forum.inductiveautomation.com/t/popup-calendar-removing-seconds/17022/5 "2019-07-22T15:38:41Z")

</div>

use this script in ‘internalFrameActivated’ to accomplish this:

system.gui.getParentWindow(event).getComponentForPath(‘Root Container.Calendar’).getTimeSelector().setTimeFormat(“HH:mm aa”)

to test this script, you can open this window in the client

---

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [February 10, 2022, 1:36pm UTC](https://forum.inductiveautomation.com/t/popup-calendar-removing-seconds/17022/6 "2022-02-10T13:36:21Z")

</div>

This works for the Calendar component, but not the popup calendar.
