jquery-ui icon indicating copy to clipboard operation
jquery-ui copied to clipboard

$.ui.datepicker has no .prototype

Open lehelkeresztes opened this issue 8 years ago • 2 comments

Every widget i'm using from the jquery UI has a .prototype, but not datepicker. I've found this issue by trying to overwrite classes, as per the guide here.

Here's my code snippet, which works for every widget, except datepicker: $.extend( $.ui.selectmenu.prototype.options.classes, { "ui-selectmenu-menu": "custom-class-name" });

lehelkeresztes avatar Nov 28 '17 12:11 lehelkeresztes

Thanks for the report. Since the issue is already in 1.12, given limited team resources it's not likely to be fixed by the UI team; see the project status at https://blog.jqueryui.com/2021/10/jquery-maintainers-update-and-transition-jquery-ui-as-part-of-overall-modernization-efforts/.

@fnagel may have more context about the design of the datepicker.

mgol avatar Sep 12 '23 00:09 mgol

@mgol In this case, I have some more insights :-)

@lehelkeresztes You are right. The datepicker plugin is the only one which is not based on the widget base class. This is due to historical reasons.

We planned to release two new widgets in order to replace the current datepicker plugin: calendar and datepicker. Sadly, they never made it to an official release. You can find some more info about those widgets here:

https://jqueryui.pbworks.com/w/page/12137778/Datepicker https://github.com/jquery/jquery-ui/tree/datepicker

fnagel avatar Oct 19 '23 13:10 fnagel