Change the now button in date pickers

QuestionsChange the now button in date pickers
Sunil asked 10 years ago

Hi,
I have bought a paid version of grid, I wanted to know if I could change the text of "Now" to "Start" in one of my date picker and "Stop" in another date picker

3 Answers
Abu Ghufran answered 10 years ago

You can set datepicker options using "opts" setting:

$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d.m.Y', "opts" => array("changeYear" => false, "currentText"=> 'Start', "showButtonPanel"=> true ));

For complete list of datepicker options, refer this link: http://api.jqueryui.com/datepicker/

Sunil answered 10 years ago

Thanks your early reply. I had one more question, can I make the now button to select the date time and exit the datepicker. Is there a smarty code for that. That would help me a lot and save me a lot of time.

Thanks in advance.

Abu Ghufran answered 10 years ago

Hello,

You can search for datepicker documentation and help for such function.
Perhaps, you will need to write handler of onselect and call .hide() function in it.

http://api.jqueryui.com/datepicker/#option-onSelect
http://api.jqueryui.com/datepicker/#method-hide

Your Answer

12 + 11 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?