TimeInput Widget day view?

I searched among the many examples proposed but found no answer …
In the TimeInput widget I have this code which shows me the indicated parameters

BLYNK_WRITE(V0) {  // Called whenever setting Time Input Widget
  TimeInputParam t(param);
  SThour = t.getStartHour();
  STmin = t.getStartMinute();
  STsec = t.getStartSecond();
  SPhour = t.getStopHour();
  SPmin = t.getStopMinute();
  SPsec = t.getStopSecond();
  //day = t.isWeekdaySelected();

  Serial.println(SThour);
  Serial.println();
  Serial.println(STmin);
  Serial.println();
  Serial.println(SPhour);
  Serial.println();
  Serial.println(SPmin);
  Serial.println();
  //Serial.println(day);
  //Serial.println();
}

I can’t see the days selected in the widget … what is the parameter to call and what kind of variable should it be?

You have to query the days one at a time to see if they are selected, using t.isWeekdaySelected(dayIndex)

This is the section of code from the example:

  // Process weekdays (1. Mon, 2. Tue, 3. Wed, ...)

  for (int i = 1; i <= 7; i++) {
    if (t.isWeekdaySelected(i)) {
      Serial.println(String("Day ") + i + " is selected");
    }

Pete.

1 Like

Thanks Pete, you are always very kind! It is strange that in the library it was not thought to be able to directly obtain the days selected in the widget without using the code you indicated …