Remove the Now button from the jsfile jQuery timepicker plugin

Does anyone know how to remove the Now button from a jquery timepicker file to a file?

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

I use Timepicker Trent Richardson.

The time indicator can be seen on this website: click here

Here you can see the js file, click here

+6
source share
5 answers

The Now button usually replaces the Today button, but without the text, the default value is used.

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

If I remember correctly, you can set this to .ui-priority-secondary - but not sure if it is used elsewhere .. there is a game, but this should be your decision, it just depends on the use.

+3
source

Found my answer here:

I use the Yii extension and added the code found on the site below to the css / main.css file. Voila!

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

+2
source

Use this CSS, works great for me.

 .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; background: #900; display: none; } 
+1
source

The following .timepicker() property solved my problem:

 minDate: new Date(2080, 1, 1) 

Just specify a very long date that disables now itself.

So the final code is:

 $('#time-duration-box').timepicker({ minDate: new Date(2050, 1, 1) }); 
0
source

To hide all calendar buttons, set the showButtonPanel property with false

 $("#inputDate").datetimepicker({showButtonPanel: false}); 
0
source

Source: https://habr.com/ru/post/903869/


All Articles