-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexample_DateTimePicker.py
44 lines (37 loc) · 1.11 KB
/
example_DateTimePicker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import dash_cool_components
import dash
from dash.dependencies import Input, Output
import dash_html_components as html
import dash_bootstrap_components as dbc
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
app.layout = dbc.Container([
dbc.Row([
dbc.Col([
dbc.Label('Input component'),
dash_cool_components.DateTimePicker(
id="input",
value="2020-09-02T14:00:00.000-03:00"
)
], width={'size':4}),
dbc.Col([
dbc.Label('Output component'),
dash_cool_components.DateTimePicker(
id="output",
)
], width={'size':4}),
dbc.Col([
dbc.Label('Output String'),
dbc.Input(id='output-text')
],width={'size':4}),
]),
html.Div(id='hidden')
], style={'marginTop': '200px'})
@app.callback(
[Output('output', 'value'), Output('output-text', 'value')],
[Input('input', 'value')]
)
def timezone_test(value):
print('Output', value)
return value, value
if __name__ == '__main__':
app.run_server(debug=True)