jquery / jquery-ui

The official jQuery user interface library.
https://jqueryui.com
Other
11.25k stars 5.31k forks source link

$.ui.datepicker has no .prototype #2156

Open lehelkeresztes opened 6 years ago

lehelkeresztes commented 6 years ago

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" });

mgol commented 11 months ago

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.

fnagel commented 10 months ago

@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