Contact Us:

670 Lafayette Ave, Brooklyn,
NY 11216

+1 800 966 4564
+1 800 9667 4558

Having trouble with and components? Then why don’t you use Jqyery Datepicker?

Jquery datepicker gives a lot of flexibility and freedom to developers to let them use a datepicker as per business needs. A developer can enforce validation on dates and date range which is very hard to impose using these out-of-the-box components as they rely on HTML5 input element.
Following component is using the jquery datepicker to get the date of birth from users.
https://gist.github.com/sfcure/d3b3c89f61763e6de5d2529e3b0b74de

NOTE –

In the above example, I used an old version of jquery which is jquery-2.2.4 due to LockerService bug. LockerService’s SecureWindow does not support a ‘hasOwnProperty’ method which is being used in the latest versions of the jQuery library.

Preview

20171006-021715_capture

2 Comments

  1. By
    October 28, 2017

    Hi Naval,
    Can you share library and to load because even i tried with latest jquery3.2.1 and jquery.1.12.1.It is not loading properly. and datepicker is not appearing

    • By
      November 30, 2017

      Hi Sagar,
      I used jquery.2.2.4 and jquery-ui.1.12.1 libraries. Let me know if you still have an issue.
      Thanks,

Leave a comment

Your email address will not be published. Required fields are marked *