Topic: Date Picker 5 - Uncaught TypeError: Cannot read property 'readOnly' of null

EMSupport priority asked 3 years ago

Expected behavior Show calendar icon (button) and no error

Actual behavior There is no calendar icon and there is a error "Uncaught TypeError: Cannot read property 'readOnly' of null"

Resources (screenshots, code snippets etc.)

Dawid Wajszczuk staff answered 3 years ago


@UNNdev is right, but I couldn't open his snippet. So here is the example with JS init . But you can do the same with just HTML and data-attributes, here is another snippet . For more information and examples visit our documentation .

Keep coding,

UNNdev priority answered 3 years ago

You must wrap the input with a div with relative position and init the Datepicker on the wrapper.

Realmonitor Ltd priority commented 2 years ago

I have the same problem, unfortunately I can't see your example.

Dawid Wajszczuk staff commented 2 years ago

I have provided the solution in the comment above.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.8.1
  • Device: PC
  • Browser: Chrome
  • OS: Window 10
  • Provided sample code: No
  • Provided link: Yes