I am new to JavaScript. My requirement is that T want to pop up a message on particular days (like Sunday, Monday...) all through when a date is selected.
I tried
var date = new Date();
var day = date.getDay();
day
now holds a number from zero to six; zero is Sunday, one is Monday, and so on.
So all that remains is to translate that number into the English (or whatever other language) string for the day name:
var name = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][day];