Neha Trivedi

Neha Trivedi

  • NA
  • 81
  • 2.8k

how to get the First date and Last date of the given month ?

Nov 27 2018 4:39 AM
I have used dropdownlist for the month and i want to get the first and last date of the month selected in dropdown.
 
<select  id="Month">
<option value="1" >Jan</option>
<option value="2">Feb</option>
<option value="3" >Mar</option>
<option value="4">Apr</option>
<option value="5">May</option>
<option value="6">Jun</option>
<option value="7">Jul</option>
<option value="8">Aug</option>
<option value="9">Sept</option>
<option value="10">Oct</option>
<option value="11" >Nov</option>
<option value="12">Dec</option>
</select>
 
if i have selected nov so result i want is 1-11-2018 the first date and 30-11-2018 as last date. 

Answers (2)