Estoy usando Jquery y Jquery-ui para crear un selector de fechas. Como paquete de módulos, estoy usando webpack. Y cuando intento ejecutar mi proyecto, aparece este error:
Uncaught TypeError: jquery__WEBPACK_IMPORTED_MODULE_0___default(...)(...).datepicker is not a functionAquí está mi código:
import $ from "jquery"; import { datepicker } from "jquery-ui"; const currentTime = new Date() const maxDate = new Date(currentTime.getFullYear(), currentTime.getMonth()); $(function () { $(".datepicker").datepicker({ dateFormat: 'yy-mm-dd', defaultDate: 1, showOtherMonths: true, selectOtherMonths: true, maxDate: new Date() }).datepicker('setDate', new Date()); })