jQWidgets Forums
jQuery UI Widgets › Forums › Editors › DateTimeInput › Unselecting the present date on open
This topic contains 8 replies, has 2 voices, and was last updated by Buggs2015 7 years, 2 months ago.
-
Author
-
Hello,
Is there a way to disable the picker from selecting/highlighting the present date on open?
Thanks a bunch
Cheers,
Jay
Hello Jay,
Unfortunately, there is no such option.
You could use CSS use classes of the Calendar because the jqxDateTimeInput inherited the jqxCalendar:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxcalendar/jquery-calendar-styling-and-appearance.htm?search=cale
With “jqx-calendar-cell-today” class you could add specific settings to achieve this.
Please, take a look at this workaround:
http://jsfiddle.net/y5sobb29/Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comThank you very much Hristo for the wonderful example. My only problem now is that if a user clicks and selects the present date, the styling does not get called or changed for the .selected class. Is there anyway to have the best of both worlds here?
Cheers,
Jay
Hello Jay,
In your first post, you mentioned that you do not want to have the option to select ‘today’.
Now you want to be selected. Could you clarify it?
Please, provide me more details and what you want to achieve.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo,
Basically, when you open the datetimepicker, the default date selection is today’s (present) date. The default should be that when a user opens the datetimepicker no date should selected nor present.
If the user makes a selection and selects a date either, the present date, a date in the past or a date in the future, then that is their selected date.
Does that make any sense?
Cheers,
Jay
Hello Jay,
I would like to suggest you look at this example:
http://jsfiddle.net/txhi/Lqueujtj/
Maybe this is what you want to achieve.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comThank you for your continued support Hristo.
I see that when I open the datepicker that the present date is still highlighted. Your previous example worked well where it appeared that the present date wasn’t highlighted. The only problem with your first example was that if the user selected the present date, it would appear that the user never made a selection.
I will reword my question and provide an example:
My objective is this: Don’t select and style (highlight) the present date when the datetimepicker is first opened by the user. Instead, let the user make a choice to select a date in the date picker.
If, by chance, the user happens to pick the present date, the date picker should still function normally (hover and selection)
https://i.stack.imgur.com/HDGmk.png
Does that make any sense? or does this go above and beyond the functionality of the addin?
Cheers,
Jay
Hello Jay,
Please, take a look at this example.
I hope this will help.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comWow! Hristo, you really did it!!!!
I would have never guessed the super convoluted jQuery coding that this request would have entailed.
Again, thank you again for all your kind and wonderful support.
You guys are great
Cheers,
Jay
-
AuthorPosts
You must be logged in to reply to this topic.