calendarpicker crashes edit form

Get help with using Metro 4 components
Post Reply
driviere
Posts: 5
Joined: Thu Mar 14, 2019 5:17 pm
Status: Offline

calendarpicker crashes edit form

Post by driviere » Mon May 13, 2019 9:31 pm

I've been getting this error from the console which crashes any other subsequent JS on the page.
Uncaught TypeError: Cannot read property 'slice' of undefined
I've recognized it only shows this error for odd number IDs or every other line in a list of records.

User avatar
olton
Site Admin
Posts: 230
Joined: Mon Apr 09, 2018 6:19 pm
Location: Kiev, Ukraine
Status: Offline

Post by olton » Mon May 13, 2019 9:49 pm

create your problem code example on codepen.io or sandbox.org.ua

driviere
Posts: 5
Joined: Thu Mar 14, 2019 5:17 pm
Status: Offline

Post by driviere » Wed May 15, 2019 3:32 pm


User avatar
olton
Site Admin
Posts: 230
Joined: Mon Apr 09, 2018 6:19 pm
Location: Kiev, Ukraine
Status: Offline

Post by olton » Wed May 15, 2019 3:38 pm


driviere
Posts: 5
Joined: Thu Mar 14, 2019 5:17 pm
Status: Offline

Post by driviere » Wed May 15, 2019 4:03 pm

The values are stored in the db, should I have to convert the date before displaying because "date-format" doesn't seem to work.

User avatar
olton
Site Admin
Posts: 230
Joined: Mon Apr 09, 2018 6:19 pm
Location: Kiev, Ukraine
Status: Offline

Post by olton » Wed May 15, 2019 4:10 pm

use attribute data-input-format="%d-%m-%y" with your value

driviere
Posts: 5
Joined: Thu Mar 14, 2019 5:17 pm
Status: Offline

Post by driviere » Wed May 15, 2019 4:24 pm

perfect thanks.

Post Reply