function getSettingDate( settingDateRang ){
if( settingDateRang ){
switch( settingDateRang ){
case "Weekly" :
return {
"startDateRes" : getMonday( 1 ),
"endDateRes" : getMonday( 7 ),
}
case "Monthly" :
var manageDate = new Date();
return {
"startDateRes" : new Date(manageDate.getFullYear(), manageDate.getMonth(), 1),
"endDateRes" : new Date(manageDate.getFullYear(), manageDate.getMonth() + 1, 0),
}
case "Quarterly" :
var manageDate = new Date();
var years = manageDate.getFullYear();
var quarter = Math.floor((manageDate.getMonth() + 3) / 3);
return {
"startDateRes" : new Date(years,quarter*3-3,1),
"endDateRes" :new Date(years,quarter*3,0),
}
case "Yearly" :
var manageDate = new Date();
var years = manageDate.getFullYear();
return {
"startDateRes" : new Date( "01-01-"+years ),
"endDateRes" :new Date( "12-31-"+years),
}
}
}
}
Blog have Angularjs Tutorials and examples with Jquery
Angular
How to set the date in the Angular Date Range to Weekly or monthly or Quarterly or Yearly
Next
« Prev Post
« Prev Post
Previous
Next Post »
Next Post »
Subscribe to:
Post Comments (Atom)