Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove 'Now' button from jsfile of timepicker jquery plugin

Does anyone know how to remove the "Now" button from the jquery timepicker add on file?

I removed the var currentText = 'Now', and this change removes the text, but the button is still there, labelled "Today" instead of "Now". I do not need this button in the timepicker.

I am using Trent Richardson's timepicker.

The timepicker can be seen on this website: click here

The js file can be seen here, click here

like image 454
BruceyBandit Avatar asked Dec 15 '11 18:12

BruceyBandit


2 Answers

The 'Now' button replaces the Today button normally, but without text it uses the default.

In your CSS, simply set the now button to "display: none;"

If I remember correctly, you can set this in the .ui-priority-secondary - but not sure if it is used elsewhere.. have a play, but this should be your solution, just depends on usage.

like image 174
Warren Sergent Avatar answered Sep 21 '22 14:09

Warren Sergent


Found my answer here:

I am using the Yii extension and added the code found at the site below to my css/main.css file. Voila!

https://forum.jquery.com/topic/disable-now-in-timepicker

like image 28
Andrew Avatar answered Sep 20 '22 14:09

Andrew