|
1 | 1 | import { Component } from "./component";
|
2 | 2 | import { M } from "./global";
|
3 | 3 | import { Modal } from "./modal";
|
| 4 | +import { FormSelect } from "./select"; |
4 | 5 |
|
5 | 6 | let _defaults = {
|
6 | 7 | // Close when date is selected
|
@@ -207,11 +208,11 @@ let _defaults = {
|
207 | 208 | destroySelects() {
|
208 | 209 | let oldYearSelect = this.calendarEl.querySelector('.orig-select-year');
|
209 | 210 | if (oldYearSelect) {
|
210 |
| - M.FormSelect.getInstance(oldYearSelect).destroy(); |
| 211 | + FormSelect.getInstance(oldYearSelect).destroy(); |
211 | 212 | }
|
212 | 213 | let oldMonthSelect = this.calendarEl.querySelector('.orig-select-month');
|
213 | 214 | if (oldMonthSelect) {
|
214 |
| - M.FormSelect.getInstance(oldMonthSelect).destroy(); |
| 215 | + FormSelect.getInstance(oldMonthSelect).destroy(); |
215 | 216 | }
|
216 | 217 | }
|
217 | 218 |
|
@@ -657,11 +658,11 @@ let _defaults = {
|
657 | 658 | // Init Materialize Select
|
658 | 659 | let yearSelect = this.calendarEl.querySelector('.orig-select-year');
|
659 | 660 | let monthSelect = this.calendarEl.querySelector('.orig-select-month');
|
660 |
| - M.FormSelect.init(yearSelect, { |
| 661 | + FormSelect.init(yearSelect, { |
661 | 662 | classes: 'select-year',
|
662 | 663 | dropdownOptions: { container: document.body, constrainWidth: false }
|
663 | 664 | });
|
664 |
| - M.FormSelect.init(monthSelect, { |
| 665 | + FormSelect.init(monthSelect, { |
665 | 666 | classes: 'select-month',
|
666 | 667 | dropdownOptions: { container: document.body, constrainWidth: false }
|
667 | 668 | });
|
|
0 commit comments