How to remove seconds in Datetime Picker

Sean.T 29 Aug, 2013
Hey guys this is my first post. I have searched all over but without any success. I am trying to remove the seconds field in the datetime picker. I do not know where It is being saved to or where the files are, in order for it to be edited. I am using joomla 2.5 with the V4 stable component. Any help or information I can get would be much appreciated.


Regards Sean
marcinwolejko 29 Aug, 2013
You should make some changes to datepicker.js file and remove all info about seconds.
The file is under components/com_chronoforms/js/datepicker

Worked for me.
GreyHead 29 Aug, 2013
Hi Seat.T,

If you are using Joomla! 2.5 you should check that you are using the MooTools datepicker. Click the 'form name' link in the Forms Manager to see the form General tab and scroll down. There is a selector for the DatePicker type. There's also an options box. Add format: '%Y-%m-%d %H:%i' to set a format (or some other format to suit your need).

Bob

PS Removing seconds from the datepicker file will probably work but sounds like hard work to me.
Sean.T 29 Aug, 2013
Thanks for the response guys. I have tried both inputs but nothing works. With marcinwolejko idea the second is removed but there is a "s" that appears in the place of the second field and with greyhead nothing happens even when I change to Mootools etc. Any ideas?

Many thanks
marcinwolejko 29 Aug, 2013
Sean.T

In the actions tab you can find the Power Fields group.
Drop the custom datepicker into on load event tab and set the values as needed.

Give your time picker field some class - i.e. time
Then in the config panel set it as below:

[attachment=0]picker.jpg[/attachment]

This should work
GreyHead 29 Aug, 2013
Hi marcinwolejko,

That's fine but I still strongly recommend that you use the MooTools DatePicker and not the MonkeyPhysics datepicker which has not been updated to work with later releases of MooTools.

Bob
marcinwolejko 29 Aug, 2013
Hi GreyHead.

Thanks for the tip. I'll keep that in mind. 😀
This topic is locked and no more replies can be posted.