To obtain the first and last date of the current month and current date , first obtain the current date and then apply the below javascript function.
//obtain the current date
var date=new Date();
//split the date portion using javascript split function
var us_date=new Date(usTime.split(' ')[0]);
//obtain the first day of the current month from the new date
var firstDay = new Date(us_date.getFullYear(), date.getMonth(), 1);
//format the date in mm/dd/yyyy format
var from=(firstDay.getMonth()+1) + '/' + firstDay.getDate() + '/' +firstDay.getFullYear();
//obtain the last day of the current month from the new date
var lastDay = new Date(us_date.getFullYear(), date.getMonth() + 1, 0);
//format the date in mm/dd/yyyy format
var to=(lastDay.getMonth()+1)+ '/' + lastDay.getDate() + '/' +lastDay.getFullYear();