How to set date in Angular Selecting date range to 1st of month
Im using this Angular directive to select date range
https://github.com/g00fy-/angular-datepicker
The default date is currently set to the current date
How to set the first date range to the first day of the month. How do I set the date?
<div date-range start="a" end="b"> </div>
{{(a|date)||"pick start"}} {{(b|date)||"pick end"}}
+3
AlexFF1
source
to share
1 answer
you can use
var date = new Date();
$scope.a = new Date(date.getFullYear(), date.getMonth(), 1);
$scope.b = new Date(date.getFullYear(), date.getMonth() + 1, 0);
+1
Pankaj Parkar
source
to share