From deefd1e0ea88ca462cdf580566da9f8159a0e838 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 30 Mar 2023 08:32:26 -0600 Subject: [PATCH] Et2SelectDayOfWeek: Fix missing all days, weekday, weekend options --- api/js/etemplate/Et2Select/Et2Select.ts | 3 ++- api/js/etemplate/Et2Select/StaticOptions.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Select/Et2Select.ts b/api/js/etemplate/Et2Select/Et2Select.ts index 67fc0a7eab..04c8b15fd2 100644 --- a/api/js/etemplate/Et2Select/Et2Select.ts +++ b/api/js/etemplate/Et2Select/Et2Select.ts @@ -924,7 +924,8 @@ export class Et2SelectDayOfWeek extends Et2StaticSelectMixin(Et2Select) for(let index in options) { let right = parseInt(options[index].value); - if(!!(int_value & right)) + + if((int_value & right) == right) { expanded_value.push("" + right); } diff --git a/api/js/etemplate/Et2Select/StaticOptions.ts b/api/js/etemplate/Et2Select/StaticOptions.ts index 57318c6554..57e430950c 100644 --- a/api/js/etemplate/Et2Select/StaticOptions.ts +++ b/api/js/etemplate/Et2Select/StaticOptions.ts @@ -345,7 +345,7 @@ export const StaticOptions = new class StaticOptionsType dow(widget : Et2SelectWidgets, attrs) : Promise { - var options = /*(widget.rows || "") +*/ ',' + (attrs.other || []).join(','); + var options = (widget.rows || "") + ',' + (attrs.other || []).join(','); return >this.cached_server_side(widget, 'select-dow', options, true); }