Webform - Show/Hide fields based on day of the week selected from Datepicker I have a little issue with a webform. 
I am setting a booking system and some items are only available on some days of the week. 
I have modified the date field to be a textbox with popup calendar 
I need to show/ hide some field based on the Day of The Week selected ( if Day is Tuesday or Day is Friday then Show the fields, otherwise, hid them) 
Any help is welcome, because with the conditionals, i can only do it based on date not on the day itself. 

thank you
I think the easiest solution is to do this with jQuery.

To get the value from the datepicker field and convert it to a weekday you might do something like this.

Add this function to your JS file:

// Accepts a Date object or date string that is recognized by the Date.parse() method
function getDayOfWeek(date) {
  var dayOfWeek = new Date(date).getDay();    
  return isNaN(dayOfWeek) ? null : [0, 1, 2, 3, 4, 5, 6][dayOfWeek];
}


Use this code to get the value from the datepicker:

var datepicker = $('#your_datepicker_id').datepicker("getDate");


Then do like this:

var today = new Date();
if (!today.getDay() == getDayOfWeek(datepicker)) {
  $('.field-names-to-hide').hide();
}


I think that something like this will do it.