JSFiddle - React, Tailwind, and code Playground

by softvar

HTML

<select name="select-choice-dayofweek" id="select-choice-dayofweek" >
                        <option value="">Day Of the Week</option>
                        <option value="Weekday">Monday-Friday</option>
                        <option value="Saturday">Saturday</option>
                        <option value="Sunday">Sunday</option>
 </select>

JavaScript

function setDayOfWeek(){

 var d = new Date();
 var n = d.getDay()

 var dayofweek= parseInt(n);
 alert(dayofweek);

    if(dayofweek > 0 && dayofweek < 6){

    alert("Weekday");
    $("#select-choice-dayofweek").val('Weekday');
    $('#select-choice-dayofweek').selectmenu("refresh");

 }

 if(dayofweek == 0){

    alert("Sunday");
    $("#select-choice-dayofweek").val('Sunday');
    $('#select-choice-dayofweek').selectmenu("refresh");

 }


 if(dayofweek == 6){

    alert("Saturday");
    $("#select-choice-dayofweek").val('Saturday');
    $('#select-choice-dayofweek').selectmenu("refresh");

 }
}
setDayOfWeek();