Viewing 2 replies - 1 through 2 (of 2 total)
  • I too just noticed that I am getting this error since applying the latest NinjaForms update back near the beginning of December 2020:
    Uncaught TypeError: dateObject.pikaday.setMinDate is not a function

    And upon further investigation, discovered that it was due to NinjaForms dropping the old Pikaday plugin that it uses for datefields, and now includes the Flatpickr plugin instead (which is fantastic, since it’s a more robust datepicker and my preferred plugin, and I was already previously using this in the same platform and other projects).

    However, this means using an alternate method when it comes to customizing the date fields, since the methods that were specific to the Pikaday plugin are no longer applicable.

    So instead of using a method like so to set a minimum date on the datepicker:
    dateObject.pikaday.setMinDate( new Date() )

    You’ll need to update your code to use an initialization method specific to the Flatpickr plugin, like so:
    dateObject.set("minDate", new Date());

    And the error should be resolved! Note that you will need to update *any* similar functionality in regards to date fields and NinjaForms.

    Hope this helps!

    • This reply was modified 3 years, 10 months ago by ouija.
    • This reply was modified 3 years, 10 months ago by ouija.
    • This reply was modified 3 years, 10 months ago by ouija.
    • This reply was modified 3 years, 10 months ago by ouija.
    Plugin Contributor Justin McElhaney

    (@jmcelhaney)

    @ouija @ravikhadka
    Can you update your Ninja Forms plugin to the latest version (3.5.1) and let me know if you continue to have the same issues?
    If you are still having this issue, can you reach out to our official support channel (ninjaforms.com/contact)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Deprecated Ninja Forms Pikaday custom code detected’ is closed to new replies.