Created
February 15, 2017 16:41
-
-
Save diewland/64a6c49117c621464ae74baf9243a5c3 to your computer and use it in GitHub Desktop.
jquery datepicker scope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://github.com/fengyuanchen/datepicker | |
| $('#from_date').datepicker({ | |
| format: 'yyyy-mm-dd', | |
| }); | |
| $('#to_date').datepicker({ | |
| format: 'yyyy-mm-dd', | |
| }); | |
| $('#from_date').change(function(){ | |
| $('#to_date').datepicker('setStartDate', $(this).val()); | |
| }); | |
| $('#to_date').change(function(){ | |
| $('#from_date').datepicker('setEndDate', $(this).val()); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment