-1

Well, I know this question has been asked before a few times but I'm just a beginner and still couldn't solve it.

I want to set the minimum date of the input date picker to today. In many answers I found the datepicker() method but my webstorm doesn't know this method.

my code:

 $("#date").datepicker("option","minDate", new Date(2020,6,5) );

Any tipps for me? Thanks a lot.

Nicolas
  • 8,077
  • 4
  • 21
  • 51
xyz
  • 25
  • 3
  • 1
    `datepicker` is a plugin method, not a core method. Did you include the plugin? – Taplar May 06 '20 at 17:52
  • Whether or not webstorm recognize the method is not important. Does your code work when you run it in the browser. – Nicolas May 06 '20 at 17:54
  • Possible duplicate: https://stackoverflow.com/questions/8025770/jquery-datepicker-not-working-date-box-not-appearing – freedomn-m May 06 '20 at 18:14
  • Does this answer your question? [jQuery UI " $("#datepicker").datepicker is not a function"](https://stackoverflow.com/questions/1212696/jquery-ui-datepicker-datepicker-is-not-a-function) – Alex May 07 '20 at 14:21

1 Answers1

0

Without thinking much about it, it's most likely because you didn't include jQuery UI. datepicker() is a jQuery UI only method.

https://jqueryui.com/

Phil
  • 10,948
  • 17
  • 69
  • 101