JSFiddle - React, Tailwind, and code Playground
by ruhul105
JavaScript
var date = new Date();
var firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
console.log(date);
console.log(firstDay);
console.log(lastDay);