Flatpickr: Uncaught TypeError: Cannot set property 'D' of undefined

Created on 8 May 2017  路  3Comments  路  Source: flatpickr/flatpickr

This error is thrown on a simple, standard init of flatpickr at flatpickr.js:1470.

Stack trace:

Uncaught TypeError: Cannot set property 'D' of undefined
    at http://localhost:8300/bundle-app.js?cache-bust=38376737:14585:20
    at Array.forEach (native)
    at setupFormats (http://localhost:8300/bundle-app.js?cache-bust=38376737:14584:34)
    at init (http://localhost:8300/bundle-app.js?cache-bust=38376737:13150:3)
    at Flatpickr (http://localhost:8300/bundle-app.js?cache-bust=38376737:14868:2)
    at Object.viewConfig (http://localhost:8300/bundle-app.js?cache-bust=38376737:50231:15)
    at http://localhost:8300/bundle-app.js?cache-bust=38376737:27903:30
    at http://localhost:8300/bundle-app.js?cache-bust=38376737:28788:40
    at forEach (http://localhost:8300/bundle-app.js?cache-bust=38376737:27647:39)
    at Function.m.render (http://localhost:8300/bundle-app.js?cache-bust=38376737:28788:3)

Flatpickr version 2.6.1

Most helpful comment

The last comment is inconsistent with the linked usage guide. There is no new keyword in the usage guide, and I'm getting the same error by following the usage guide.

All 3 comments

Using the latest version, and getting the same issue.

import Picker from './lib/flatpickr';

let options = { };
let datePicker = Picker(el, options);

Gives this error :(

Hello,

let datePicker = Picker(el, options);

You're missing the new keyword.
Please review the usage guide

The last comment is inconsistent with the linked usage guide. There is no new keyword in the usage guide, and I'm getting the same error by following the usage guide.

Was this page helpful?
0 / 5 - 0 ratings