Fix string type dates not being parsed.
Fix table flex alignment Topbar switcher values now update immediately
This commit is contained in:
@ -210,7 +210,10 @@ class SeriesCommon(Pane):
|
||||
|
||||
def _single_datetime_format(self, arg):
|
||||
if isinstance(arg, (str, int, float)) or not pd.api.types.is_datetime64_any_dtype(arg):
|
||||
arg = pd.to_datetime(arg, unit='ms')
|
||||
try:
|
||||
arg = pd.to_datetime(arg, unit='ms')
|
||||
except ValueError:
|
||||
arg = pd.to_datetime(arg)
|
||||
arg = self._interval * (arg.timestamp() // self._interval)+self.offset
|
||||
return arg
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ if (!window.Table) {
|
||||
this.reSize(width, height)
|
||||
this.container.style.display = 'flex'
|
||||
this.container.style.flexDirection = 'column'
|
||||
this.container.style.justifyContent = 'space-between'
|
||||
// this.container.style.justifyContent = 'space-between'
|
||||
|
||||
this.container.style.borderRadius = '5px'
|
||||
this.container.style.color = 'white'
|
||||
|
||||
@ -43,6 +43,7 @@ class SwitcherWidget(Widget):
|
||||
if option not in self.options:
|
||||
raise ValueError(f"option '{option}' does not exist within {self.options}.")
|
||||
self.run_script(f'{self.id}.onItemClicked("{option}")')
|
||||
self.value = option
|
||||
|
||||
|
||||
class MenuWidget(Widget):
|
||||
|
||||
Reference in New Issue
Block a user