How to get first day and last day of the month that user input in javascript.
Example:
userInputMonth = 01; //jan
How to get first day and last day of the user input month
How to get first day and last day of the month that user input in javascript.
Example:
userInputMonth = 01; //jan
How to get first day and last day of the user input month
Just use momentjs:
// Instantiate this with any moment valid date string you want
var foo = moment();
console.log(foo.endOf('month'))
console.log(foo.startOf('month'))
<script src="https://momentjs.com/downloads/moment.js"></script>