Click here to Skip to main content
15,993,109 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

i have academic year 2016-17 as dropdown list and for start date and end date have 2 textboxes "from date" should be in form of mm/yyyy and "end date" should be in form of mm/yyyy.start date is must and should lesser than end date

What I have tried:

please help me out in this.but i didnt find solution for above query
Posted
Updated 15-Oct-16 1:33am

PHP is a server-side language, however, JavaScript is a framework that you can use to provide this feature to your clients. If you are using jQuery, then the following control would be helpful to you, Datepicker | jQuery UI[^]. Date formats are provided for you, that you can use, Datepicker | jQuery UI[^].
JavaScript
$("#datepicker").datepicker("option", "dateFormat", "mm/yy");

Secondly, you can also set up the range of your date using "minDate" and "maxDate", for example like this,
JavaScript
$("#datepicker").datepicker({ minDate: new Date() });

All of the rest of the properties are also explained there that you can use. The example codes are also shown there.
 
Share this answer
 
i want "start date" and "end date" validations
 
Share this answer
 
Comments
Afzaal Ahmad Zeeshan 15-Oct-16 7:35am    
Please do not add comments or updates as solutions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900