Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wusteven815 committed Oct 29, 2024
1 parent 327860a commit 0ec34a7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/ui/src/deephaven/ui/components/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def stack(
*children: Any,
height: float | Undefined = UNDEFINED,
width: float | Undefined = UNDEFINED,
activeItemIndex: int | Undefined = UNDEFINED,
active_item_index: int | Undefined = UNDEFINED,
key: str | Undefined = UNDEFINED,
**kwargs: Any,
) -> Element:
Expand Down
29 changes: 27 additions & 2 deletions plugins/ui/test/deephaven/ui/test_date_range_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def test_convert_date_range_picker_props(self):
convert_list_prop,
_convert_to_java_date,
)
from deephaven.ui.types import UNDEFINED

def verify_is_local_date(dateStr):
self.assertEqual(
Expand All @@ -40,6 +41,7 @@ def empty_on_change():
"default_value": {"start": "2021-01-01 ET", "end": "2021-01-02 ET"},
"min_value": to_j_zdt("2021-01-01 ET"),
"max_value": to_j_local_date("2021-01-01"),
"on_change": UNDEFINED,
}

props2 = {
Expand All @@ -53,6 +55,8 @@ def empty_on_change():
},
"placeholder_value": to_j_instant("2021-01-01 UTC"),
"on_change": verify_is_local_date,
"min_value": UNDEFINED,
"max_value": UNDEFINED,
}

props3 = {
Expand All @@ -62,16 +66,37 @@ def empty_on_change():
},
"placeholder_value": to_j_zdt("2021-01-01 ET"),
"on_change": verify_is_instant,
"value": UNDEFINED,
"min_value": UNDEFINED,
"max_value": UNDEFINED,
}

props4 = {
"placeholder_value": to_j_zdt("2021-01-01 ET"),
"on_change": verify_is_zdt,
"value": UNDEFINED,
"default_value": UNDEFINED,
"min_value": UNDEFINED,
"max_value": UNDEFINED,
}

props5 = {"on_change": verify_is_instant}
props5 = {
"on_change": verify_is_instant,
"value": UNDEFINED,
"default_value": UNDEFINED,
"min_value": UNDEFINED,
"max_value": UNDEFINED,
"placeholder_value": UNDEFINED,
}

props6 = {"on_change": empty_on_change}
props6 = {
"on_change": empty_on_change,
"value": UNDEFINED,
"default_value": UNDEFINED,
"min_value": UNDEFINED,
"max_value": UNDEFINED,
"placeholder_value": UNDEFINED,
}

_convert_date_range_picker_props(props1)
_convert_date_range_picker_props(props2)
Expand Down

0 comments on commit 0ec34a7

Please sign in to comment.