yafowil.widget.datetime 2.0.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yafowil/widget/datetime/__init__.py +192 -0
- yafowil/widget/datetime/example.py +189 -0
- yafowil/widget/datetime/locales/de/LC_MESSAGES/yafowil.widget.datetime.mo +0 -0
- yafowil/widget/datetime/locales/de/LC_MESSAGES/yafowil.widget.datetime.po +56 -0
- yafowil/widget/datetime/locales/en/LC_MESSAGES/yafowil.widget.datetime.mo +0 -0
- yafowil/widget/datetime/locales/en/LC_MESSAGES/yafowil.widget.datetime.po +56 -0
- yafowil/widget/datetime/locales/yafowil.widget.datetime.pot +52 -0
- yafowil/widget/datetime/resources/bootstrap5/datepicker.min.css +1 -0
- yafowil/widget/datetime/resources/bootstrap5/timepicker.min.css +1 -0
- yafowil/widget/datetime/resources/bootstrap5/widget.js +597 -0
- yafowil/widget/datetime/resources/bootstrap5/widget.min.js +1 -0
- yafowil/widget/datetime/resources/default/datepicker.min.css +1 -0
- yafowil/widget/datetime/resources/default/timepicker.min.css +1 -0
- yafowil/widget/datetime/resources/default/widget.js +503 -0
- yafowil/widget/datetime/resources/default/widget.min.js +1 -0
- yafowil/widget/datetime/resources/locales/ar-tn.js +15 -0
- yafowil/widget/datetime/resources/locales/ar.js +15 -0
- yafowil/widget/datetime/resources/locales/az.js +14 -0
- yafowil/widget/datetime/resources/locales/bg.js +14 -0
- yafowil/widget/datetime/resources/locales/bm.js +18 -0
- yafowil/widget/datetime/resources/locales/bn.js +19 -0
- yafowil/widget/datetime/resources/locales/br.js +18 -0
- yafowil/widget/datetime/resources/locales/bs.js +15 -0
- yafowil/widget/datetime/resources/locales/ca.js +18 -0
- yafowil/widget/datetime/resources/locales/cs.js +19 -0
- yafowil/widget/datetime/resources/locales/cy.js +14 -0
- yafowil/widget/datetime/resources/locales/da.js +19 -0
- yafowil/widget/datetime/resources/locales/de.js +18 -0
- yafowil/widget/datetime/resources/locales/el.js +16 -0
- yafowil/widget/datetime/resources/locales/en-AU.js +18 -0
- yafowil/widget/datetime/resources/locales/en-CA.js +18 -0
- yafowil/widget/datetime/resources/locales/en-GB.js +18 -0
- yafowil/widget/datetime/resources/locales/en-IE.js +17 -0
- yafowil/widget/datetime/resources/locales/en-NZ.js +17 -0
- yafowil/widget/datetime/resources/locales/en-ZA.js +17 -0
- yafowil/widget/datetime/resources/locales/eo.js +17 -0
- yafowil/widget/datetime/resources/locales/es.js +18 -0
- yafowil/widget/datetime/resources/locales/et.js +18 -0
- yafowil/widget/datetime/resources/locales/eu.js +18 -0
- yafowil/widget/datetime/resources/locales/fa.js +17 -0
- yafowil/widget/datetime/resources/locales/fi.js +17 -0
- yafowil/widget/datetime/resources/locales/fo.js +15 -0
- yafowil/widget/datetime/resources/locales/fr-CH.js +21 -0
- yafowil/widget/datetime/resources/locales/fr.js +18 -0
- yafowil/widget/datetime/resources/locales/gl.js +16 -0
- yafowil/widget/datetime/resources/locales/he.js +15 -0
- yafowil/widget/datetime/resources/locales/hi.js +18 -0
- yafowil/widget/datetime/resources/locales/hr.js +13 -0
- yafowil/widget/datetime/resources/locales/hu.js +18 -0
- yafowil/widget/datetime/resources/locales/hy.js +18 -0
- yafowil/widget/datetime/resources/locales/id.js +15 -0
- yafowil/widget/datetime/resources/locales/is.js +14 -0
- yafowil/widget/datetime/resources/locales/it-CH.js +20 -0
- yafowil/widget/datetime/resources/locales/it.js +18 -0
- yafowil/widget/datetime/resources/locales/ja.js +17 -0
- yafowil/widget/datetime/resources/locales/ka.js +17 -0
- yafowil/widget/datetime/resources/locales/kk.js +15 -0
- yafowil/widget/datetime/resources/locales/km.js +15 -0
- yafowil/widget/datetime/resources/locales/ko.js +18 -0
- yafowil/widget/datetime/resources/locales/lt.js +19 -0
- yafowil/widget/datetime/resources/locales/lv.js +18 -0
- yafowil/widget/datetime/resources/locales/me.js +17 -0
- yafowil/widget/datetime/resources/locales/mk.js +15 -0
- yafowil/widget/datetime/resources/locales/mn.js +17 -0
- yafowil/widget/datetime/resources/locales/mr.js +18 -0
- yafowil/widget/datetime/resources/locales/ms.js +15 -0
- yafowil/widget/datetime/resources/locales/nl-BE.js +18 -0
- yafowil/widget/datetime/resources/locales/nl.js +18 -0
- yafowil/widget/datetime/resources/locales/no.js +18 -0
- yafowil/widget/datetime/resources/locales/oc.js +17 -0
- yafowil/widget/datetime/resources/locales/pl.js +17 -0
- yafowil/widget/datetime/resources/locales/pt-BR.js +17 -0
- yafowil/widget/datetime/resources/locales/pt.js +18 -0
- yafowil/widget/datetime/resources/locales/ro.js +17 -0
- yafowil/widget/datetime/resources/locales/ru.js +18 -0
- yafowil/widget/datetime/resources/locales/si.js +18 -0
- yafowil/widget/datetime/resources/locales/sk.js +18 -0
- yafowil/widget/datetime/resources/locales/sl.js +15 -0
- yafowil/widget/datetime/resources/locales/sq.js +18 -0
- yafowil/widget/datetime/resources/locales/sr-latn.js +16 -0
- yafowil/widget/datetime/resources/locales/sr.js +16 -0
- yafowil/widget/datetime/resources/locales/sv.js +17 -0
- yafowil/widget/datetime/resources/locales/sw.js +15 -0
- yafowil/widget/datetime/resources/locales/ta.js +18 -0
- yafowil/widget/datetime/resources/locales/tg.js +19 -0
- yafowil/widget/datetime/resources/locales/th.js +14 -0
- yafowil/widget/datetime/resources/locales/tk.js +18 -0
- yafowil/widget/datetime/resources/locales/tr.js +17 -0
- yafowil/widget/datetime/resources/locales/uk.js +17 -0
- yafowil/widget/datetime/resources/locales/uz-cyrl.js +18 -0
- yafowil/widget/datetime/resources/locales/uz-latn.js +18 -0
- yafowil/widget/datetime/resources/locales/vi.js +16 -0
- yafowil/widget/datetime/resources/locales/zh-CN.js +19 -0
- yafowil/widget/datetime/resources/locales/zh-TW.js +18 -0
- yafowil/widget/datetime/resources/vanillajs-datepicker/datepicker.js +2870 -0
- yafowil/widget/datetime/resources/vanillajs-datepicker/datepicker.min.js +1 -0
- yafowil/widget/datetime/tests/test_widget.py +769 -0
- yafowil/widget/datetime/widget.py +531 -0
- yafowil_widget_datetime-2.0.0.dist-info/METADATA +60 -0
- yafowil_widget_datetime-2.0.0.dist-info/RECORD +103 -0
- yafowil_widget_datetime-2.0.0.dist-info/WHEEL +5 -0
- yafowil_widget_datetime-2.0.0.dist-info/entry_points.txt +3 -0
- yafowil_widget_datetime-2.0.0.dist-info/licenses/LICENSE.rst +27 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
from yafowil.base import factory
|
|
2
|
+
from yafowil.utils import entry_point
|
|
3
|
+
import os
|
|
4
|
+
import webresource as wr
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
resources_dir = os.path.join(os.path.dirname(__file__), 'resources')
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
##############################################################################
|
|
11
|
+
# vanillajs-datepicker
|
|
12
|
+
##############################################################################
|
|
13
|
+
|
|
14
|
+
# webresource ################################################################
|
|
15
|
+
|
|
16
|
+
vanillajs_datepicker_js = wr.ScriptResource(
|
|
17
|
+
name='datepicker-js',
|
|
18
|
+
directory=os.path.join(resources_dir, 'vanillajs-datepicker'),
|
|
19
|
+
path='yafowil-datetime/vanillajs-datepicker',
|
|
20
|
+
resource='datepicker.js',
|
|
21
|
+
compressed='datepicker.min.js'
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
##############################################################################
|
|
26
|
+
# locale
|
|
27
|
+
##############################################################################
|
|
28
|
+
|
|
29
|
+
# webresource ################################################################
|
|
30
|
+
|
|
31
|
+
locale_de = wr.ScriptResource(
|
|
32
|
+
name='datepicker-de-js',
|
|
33
|
+
depends='datepicker-js',
|
|
34
|
+
directory=os.path.join(resources_dir, 'locales'),
|
|
35
|
+
path='yafowil-datetime/locales',
|
|
36
|
+
resource='de.js'
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
##############################################################################
|
|
41
|
+
# Default
|
|
42
|
+
##############################################################################
|
|
43
|
+
|
|
44
|
+
# webresource ################################################################
|
|
45
|
+
|
|
46
|
+
resources = wr.ResourceGroup(
|
|
47
|
+
name='yafowil.widget.datetime',
|
|
48
|
+
directory=resources_dir,
|
|
49
|
+
path='yafowil-datetime'
|
|
50
|
+
)
|
|
51
|
+
resources.add(vanillajs_datepicker_js)
|
|
52
|
+
resources.add(locale_de)
|
|
53
|
+
resources.add(wr.ScriptResource(
|
|
54
|
+
name='yafowil-datetime-js',
|
|
55
|
+
directory=os.path.join(resources_dir, 'default'),
|
|
56
|
+
path='yafowil-datetime/default',
|
|
57
|
+
depends=['jquery-js', 'datepicker-js'],
|
|
58
|
+
resource='widget.js',
|
|
59
|
+
compressed='widget.min.js'
|
|
60
|
+
))
|
|
61
|
+
resources.add(wr.StyleResource(
|
|
62
|
+
name='yafowil-datepicker-css',
|
|
63
|
+
directory=os.path.join(resources_dir, 'default'),
|
|
64
|
+
path='yafowil-datetime/default',
|
|
65
|
+
resource='datepicker.min.css'
|
|
66
|
+
))
|
|
67
|
+
resources.add(wr.StyleResource(
|
|
68
|
+
name='yafowil-timepicker-css',
|
|
69
|
+
directory=os.path.join(resources_dir, 'default'),
|
|
70
|
+
path='yafowil-datetime/default',
|
|
71
|
+
resource='timepicker.min.css'
|
|
72
|
+
))
|
|
73
|
+
|
|
74
|
+
# B/C resources ##############################################################
|
|
75
|
+
|
|
76
|
+
js = [{
|
|
77
|
+
'group': 'yafowil.widget.datetime.common',
|
|
78
|
+
'resource': 'vanillajs-datepicker/datepicker.js',
|
|
79
|
+
'order': 20,
|
|
80
|
+
}, {
|
|
81
|
+
'group': 'yafowil.widget.datetime.common',
|
|
82
|
+
'resource': 'locales/de.js',
|
|
83
|
+
'order': 20,
|
|
84
|
+
}, {
|
|
85
|
+
'group': 'yafowil.widget.datetime.common',
|
|
86
|
+
'resource': 'default/widget.js',
|
|
87
|
+
'order': 20,
|
|
88
|
+
}]
|
|
89
|
+
css = [{
|
|
90
|
+
'group': 'yafowil.widget.datetime.common',
|
|
91
|
+
'resource': 'default/datepicker.min.css',
|
|
92
|
+
'order': 20,
|
|
93
|
+
}, {
|
|
94
|
+
'group': 'yafowil.widget.datetime.common',
|
|
95
|
+
'resource': 'default/timepicker.min.css',
|
|
96
|
+
'order': 20,
|
|
97
|
+
}]
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
##############################################################################
|
|
101
|
+
# Bootstrap 5
|
|
102
|
+
##############################################################################
|
|
103
|
+
|
|
104
|
+
# webresource ################################################################
|
|
105
|
+
|
|
106
|
+
bootstrap5_resources = wr.ResourceGroup(
|
|
107
|
+
name='yafowil.widget.datetime',
|
|
108
|
+
directory=resources_dir,
|
|
109
|
+
path='yafowil-datetime'
|
|
110
|
+
)
|
|
111
|
+
bootstrap5_resources.add(vanillajs_datepicker_js)
|
|
112
|
+
bootstrap5_resources.add(locale_de)
|
|
113
|
+
bootstrap5_resources.add(wr.ScriptResource(
|
|
114
|
+
name='yafowil-datetime-js',
|
|
115
|
+
directory=os.path.join(resources_dir, 'bootstrap5'),
|
|
116
|
+
path='yafowil-datetime/bootstrap5',
|
|
117
|
+
depends=['jquery-js', 'datepicker-js'],
|
|
118
|
+
resource='widget.js',
|
|
119
|
+
compressed='widget.min.js'
|
|
120
|
+
))
|
|
121
|
+
bootstrap5_resources.add(wr.StyleResource(
|
|
122
|
+
name='yafowil-datepicker-css',
|
|
123
|
+
directory=os.path.join(resources_dir, 'bootstrap5'),
|
|
124
|
+
path='yafowil-datetime/bootstrap5',
|
|
125
|
+
resource='datepicker.min.css'
|
|
126
|
+
))
|
|
127
|
+
bootstrap5_resources.add(wr.StyleResource(
|
|
128
|
+
name='yafowil-timepicker-css',
|
|
129
|
+
directory=os.path.join(resources_dir, 'bootstrap5'),
|
|
130
|
+
path='yafowil-datetime/bootstrap5',
|
|
131
|
+
resource='timepicker.min.css'
|
|
132
|
+
))
|
|
133
|
+
# B/C resources ##############################################################
|
|
134
|
+
|
|
135
|
+
bootstrap5_js = [{
|
|
136
|
+
'group': 'yafowil.widget.datetime.common',
|
|
137
|
+
'resource': 'vanillajs-datepicker/datepicker.js',
|
|
138
|
+
'order': 20,
|
|
139
|
+
}, {
|
|
140
|
+
'group': 'yafowil.widget.datetime.common',
|
|
141
|
+
'resource': 'locales/de.js',
|
|
142
|
+
'order': 20,
|
|
143
|
+
}, {
|
|
144
|
+
'group': 'yafowil.widget.datetime.common',
|
|
145
|
+
'resource': 'bootstrap5/widget.js',
|
|
146
|
+
'order': 20,
|
|
147
|
+
}]
|
|
148
|
+
bootstrap5_css = [{
|
|
149
|
+
'group': 'yafowil.widget.datetime.common',
|
|
150
|
+
'resource': 'bootstrap5/datepicker.min.css',
|
|
151
|
+
'order': 20,
|
|
152
|
+
}, {
|
|
153
|
+
'group': 'yafowil.widget.datetime.common',
|
|
154
|
+
'resource': 'bootstrap5/timepicker.min.css',
|
|
155
|
+
'order': 20,
|
|
156
|
+
}]
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
##############################################################################
|
|
160
|
+
# Registration
|
|
161
|
+
##############################################################################
|
|
162
|
+
|
|
163
|
+
@entry_point(order=10)
|
|
164
|
+
def register():
|
|
165
|
+
from yafowil.widget.datetime import widget # noqa
|
|
166
|
+
|
|
167
|
+
widget_name = 'yafowil.widget.datetime'
|
|
168
|
+
|
|
169
|
+
# Default
|
|
170
|
+
factory.register_theme(
|
|
171
|
+
'default',
|
|
172
|
+
widget_name,
|
|
173
|
+
resources_dir,
|
|
174
|
+
js=js,
|
|
175
|
+
css=css
|
|
176
|
+
)
|
|
177
|
+
factory.register_resources('default', widget_name, resources)
|
|
178
|
+
|
|
179
|
+
# Bootstrap 5
|
|
180
|
+
factory.register_theme(
|
|
181
|
+
['bootstrap5'],
|
|
182
|
+
widget_name,
|
|
183
|
+
resources_dir,
|
|
184
|
+
js=bootstrap5_js,
|
|
185
|
+
css=bootstrap5_css
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
factory.register_resources(
|
|
189
|
+
['bootstrap5'],
|
|
190
|
+
widget_name,
|
|
191
|
+
bootstrap5_resources
|
|
192
|
+
)
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
from yafowil.base import factory
|
|
2
|
+
import datetime
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
DOC_DATE = """
|
|
6
|
+
Date Picker
|
|
7
|
+
-----------
|
|
8
|
+
|
|
9
|
+
Date input.
|
|
10
|
+
|
|
11
|
+
.. code-block:: python
|
|
12
|
+
|
|
13
|
+
date = factory('#field:datetime', props={
|
|
14
|
+
'label': 'Enter date or use date picker',
|
|
15
|
+
'required': 'Date Field is required',
|
|
16
|
+
'datepicker': True,
|
|
17
|
+
})
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def date_example():
|
|
22
|
+
form = factory('fieldset', name='yafowil.widget.datetime.date')
|
|
23
|
+
form['date'] = factory('#field:datetime', props={
|
|
24
|
+
'label': 'Enter date or use date picker',
|
|
25
|
+
'required': 'Date Field is required',
|
|
26
|
+
'datepicker': True,
|
|
27
|
+
})
|
|
28
|
+
return {
|
|
29
|
+
'widget': form,
|
|
30
|
+
'doc': DOC_DATE,
|
|
31
|
+
'title': 'Date',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
DOC_TIME = """
|
|
36
|
+
Time Picker
|
|
37
|
+
-----------
|
|
38
|
+
|
|
39
|
+
Time input.
|
|
40
|
+
|
|
41
|
+
Set the 'clock' property to either 12 or 24 hours format (defaults to 24).
|
|
42
|
+
|
|
43
|
+
.. code-block:: python
|
|
44
|
+
|
|
45
|
+
time = factory('#field:time', props={
|
|
46
|
+
'label': 'Select time',
|
|
47
|
+
'required': 'Time Field is required',
|
|
48
|
+
'timepicker': True,
|
|
49
|
+
'clock': '12'
|
|
50
|
+
})
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def time_example():
|
|
55
|
+
form = factory('fieldset', name='yafowil.widget.datetime.time')
|
|
56
|
+
form['time'] = factory('#field:time', props={
|
|
57
|
+
'label': 'Select time',
|
|
58
|
+
'required': 'Time Field is required',
|
|
59
|
+
'timepicker': True,
|
|
60
|
+
'clock': '12'
|
|
61
|
+
})
|
|
62
|
+
return {
|
|
63
|
+
'widget': form,
|
|
64
|
+
'doc': DOC_TIME,
|
|
65
|
+
'title': 'Time',
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
DOC_MINUTES = """
|
|
70
|
+
Minutes
|
|
71
|
+
-------
|
|
72
|
+
|
|
73
|
+
Sets the interval for minute cells.
|
|
74
|
+
|
|
75
|
+
Set the 'minutes_step' property to a number between 1 and 60 (defaults to 5).
|
|
76
|
+
|
|
77
|
+
.. code-block:: python
|
|
78
|
+
|
|
79
|
+
time = factory('#field:time', props={
|
|
80
|
+
'label': 'Select time',
|
|
81
|
+
'required': 'Time Field is required',
|
|
82
|
+
'timepicker': True,
|
|
83
|
+
'clock': '24',
|
|
84
|
+
'minutes_step': '15'
|
|
85
|
+
})
|
|
86
|
+
"""
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def minutes_example():
|
|
90
|
+
form = factory('fieldset', name='yafowil.widget.datetime.minutes_step')
|
|
91
|
+
form['time'] = factory('#field:time', props={
|
|
92
|
+
'label': 'Select time',
|
|
93
|
+
'required': 'Time Field is required',
|
|
94
|
+
'timepicker': True,
|
|
95
|
+
'clock': '24',
|
|
96
|
+
'minutes_step': '15'
|
|
97
|
+
})
|
|
98
|
+
return {
|
|
99
|
+
'widget': form,
|
|
100
|
+
'doc': DOC_MINUTES,
|
|
101
|
+
'title': 'Minutes'
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
DOC_DATETIME = """
|
|
106
|
+
Datetime Picker
|
|
107
|
+
---------------
|
|
108
|
+
|
|
109
|
+
Date and time input.
|
|
110
|
+
|
|
111
|
+
.. code-block:: python
|
|
112
|
+
|
|
113
|
+
datetime = factory('#field:datetime', props={
|
|
114
|
+
'label': 'Enter date and time',
|
|
115
|
+
'required': 'Datetime Field is required',
|
|
116
|
+
'locale': 'de',
|
|
117
|
+
'datepicker': True,
|
|
118
|
+
'time': True,
|
|
119
|
+
'timepicker': True
|
|
120
|
+
})
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def datetime_example():
|
|
125
|
+
form = factory('fieldset', name='yafowil.widget.datetime.datetime')
|
|
126
|
+
form['datetime'] = factory('#field:datetime', props={
|
|
127
|
+
'label': 'Enter date and time',
|
|
128
|
+
'required': 'Datetime Field is required',
|
|
129
|
+
'locale': 'de',
|
|
130
|
+
'datepicker': True,
|
|
131
|
+
'time': True,
|
|
132
|
+
'timepicker': True
|
|
133
|
+
})
|
|
134
|
+
return {
|
|
135
|
+
'widget': form,
|
|
136
|
+
'doc': DOC_DATETIME,
|
|
137
|
+
'title': 'Datetime'
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
DOC_DISPLAY = """
|
|
142
|
+
Display Mode
|
|
143
|
+
------------
|
|
144
|
+
|
|
145
|
+
The widget's display mode renders the widget value inside an uneditable div.
|
|
146
|
+
|
|
147
|
+
The wrapper div can receive additional classes via the ``display_class``
|
|
148
|
+
widget attribute.
|
|
149
|
+
|
|
150
|
+
.. code-block:: python
|
|
151
|
+
|
|
152
|
+
value = datetime.datetime.now()
|
|
153
|
+
|
|
154
|
+
datetime = factory('#field:datetime', value=value, mode='display', props={
|
|
155
|
+
'label': 'Datetime Picker in Display Mode',
|
|
156
|
+
'locale': 'de',
|
|
157
|
+
'datepicker': True,
|
|
158
|
+
'time': True,
|
|
159
|
+
'timepicker': True,
|
|
160
|
+
# 'display_class': 'my-additional-class'
|
|
161
|
+
})
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def display_example():
|
|
166
|
+
value = datetime.datetime.now()
|
|
167
|
+
form = factory('fieldset', name='yafowil.widget.datetime.display')
|
|
168
|
+
form['datetime'] = factory('#field:datetime', value=value, mode='display', props={
|
|
169
|
+
'label': 'Datetime Picker in Display Mode',
|
|
170
|
+
'locale': 'de',
|
|
171
|
+
'datepicker': True,
|
|
172
|
+
'time': True,
|
|
173
|
+
'timepicker': True
|
|
174
|
+
})
|
|
175
|
+
return {
|
|
176
|
+
'widget': form,
|
|
177
|
+
'doc': DOC_DISPLAY,
|
|
178
|
+
'title': 'Display Mode'
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def get_example():
|
|
183
|
+
return [
|
|
184
|
+
date_example(),
|
|
185
|
+
time_example(),
|
|
186
|
+
minutes_example(),
|
|
187
|
+
datetime_example(),
|
|
188
|
+
display_example()
|
|
189
|
+
]
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# German translations for yafowil.widget.datetime.
|
|
2
|
+
# Copyright (C) 2014 ORGANIZATION
|
|
3
|
+
# This file is distributed under the same license as the
|
|
4
|
+
# yafowil.widget.datetime
|
|
5
|
+
# project.
|
|
6
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
|
|
7
|
+
#
|
|
8
|
+
msgid ""
|
|
9
|
+
msgstr ""
|
|
10
|
+
"Project-Id-Version: yafowil.widget.datetime 1.5.2\n"
|
|
11
|
+
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
|
12
|
+
"POT-Creation-Date: 2025-10-28 10:11+0100\n"
|
|
13
|
+
"PO-Revision-Date: 2014-04-30 18:38+0200\n"
|
|
14
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
15
|
+
"Language-Team: de <LL@li.org>\n"
|
|
16
|
+
"Language: \n"
|
|
17
|
+
"MIME-Version: 1.0\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
20
|
+
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
|
21
|
+
"Generated-By: Babel 1.3\n"
|
|
22
|
+
|
|
23
|
+
#. Default: Not a valid time input.
|
|
24
|
+
#: src/yafowil/widget/datetime/widget.py:41
|
|
25
|
+
msgid "input_not_valid_time"
|
|
26
|
+
msgstr "Eingabe ist keine gültige Zeit"
|
|
27
|
+
|
|
28
|
+
#. Default: Failed to parse time input.
|
|
29
|
+
#: src/yafowil/widget/datetime/widget.py:52
|
|
30
|
+
msgid "failed_to_parse_time"
|
|
31
|
+
msgstr "Eingabe konnte nicht als Zeiteingabe identifiziert werden"
|
|
32
|
+
|
|
33
|
+
#. Default: Hours not a number.
|
|
34
|
+
#: src/yafowil/widget/datetime/widget.py:61
|
|
35
|
+
msgid "hours_not_a_number"
|
|
36
|
+
msgstr "Stundeneingabe ist keie Zahl"
|
|
37
|
+
|
|
38
|
+
#. Default: Minutes not a number.
|
|
39
|
+
#: src/yafowil/widget/datetime/widget.py:69
|
|
40
|
+
msgid "minutes_not_a_number"
|
|
41
|
+
msgstr "Minuteneingabe ist keine Zahl"
|
|
42
|
+
|
|
43
|
+
#. Default: Hours must be in range 0..23.
|
|
44
|
+
#: src/yafowil/widget/datetime/widget.py:78
|
|
45
|
+
msgid "invalid_hours_range"
|
|
46
|
+
msgstr "Stundeneingabe nicht im gültigen Bereich 0..23"
|
|
47
|
+
|
|
48
|
+
#. Default: Minutes must be in range 0..59.
|
|
49
|
+
#: src/yafowil/widget/datetime/widget.py:84
|
|
50
|
+
msgid "invalid_minutes_range"
|
|
51
|
+
msgstr "Minuteneingabe nicht im gültigen Bereich 0..23"
|
|
52
|
+
|
|
53
|
+
#. Default: Not a valid date input.
|
|
54
|
+
#: src/yafowil/widget/datetime/widget.py:285
|
|
55
|
+
msgid "input_not_valid_date"
|
|
56
|
+
msgstr "Eingabe ist kein gültiges Datum"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# English translations for yafowil.widget.datetime.
|
|
2
|
+
# Copyright (C) 2014 ORGANIZATION
|
|
3
|
+
# This file is distributed under the same license as the
|
|
4
|
+
# yafowil.widget.datetime
|
|
5
|
+
# project.
|
|
6
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
|
|
7
|
+
#
|
|
8
|
+
msgid ""
|
|
9
|
+
msgstr ""
|
|
10
|
+
"Project-Id-Version: yafowil.widget.datetime 1.5.2\n"
|
|
11
|
+
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
|
12
|
+
"POT-Creation-Date: 2025-10-28 10:11+0100\n"
|
|
13
|
+
"PO-Revision-Date: 2014-04-30 18:38+0200\n"
|
|
14
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
15
|
+
"Language-Team: en <LL@li.org>\n"
|
|
16
|
+
"Language: \n"
|
|
17
|
+
"MIME-Version: 1.0\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
20
|
+
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
|
21
|
+
"Generated-By: Babel 1.3\n"
|
|
22
|
+
|
|
23
|
+
#. Default: Not a valid time input.
|
|
24
|
+
#: src/yafowil/widget/datetime/widget.py:41
|
|
25
|
+
msgid "input_not_valid_time"
|
|
26
|
+
msgstr "Not a valid time input."
|
|
27
|
+
|
|
28
|
+
#. Default: Failed to parse time input.
|
|
29
|
+
#: src/yafowil/widget/datetime/widget.py:52
|
|
30
|
+
msgid "failed_to_parse_time"
|
|
31
|
+
msgstr "Failed to parse time input."
|
|
32
|
+
|
|
33
|
+
#. Default: Hours not a number.
|
|
34
|
+
#: src/yafowil/widget/datetime/widget.py:61
|
|
35
|
+
msgid "hours_not_a_number"
|
|
36
|
+
msgstr "Hours not a number."
|
|
37
|
+
|
|
38
|
+
#. Default: Minutes not a number.
|
|
39
|
+
#: src/yafowil/widget/datetime/widget.py:69
|
|
40
|
+
msgid "minutes_not_a_number"
|
|
41
|
+
msgstr "Minutes not a number."
|
|
42
|
+
|
|
43
|
+
#. Default: Hours must be in range 0..23.
|
|
44
|
+
#: src/yafowil/widget/datetime/widget.py:78
|
|
45
|
+
msgid "invalid_hours_range"
|
|
46
|
+
msgstr "Hours must be in range 0..23."
|
|
47
|
+
|
|
48
|
+
#. Default: Minutes must be in range 0..59.
|
|
49
|
+
#: src/yafowil/widget/datetime/widget.py:84
|
|
50
|
+
msgid "invalid_minutes_range"
|
|
51
|
+
msgstr "Minutes must be in range 0..59."
|
|
52
|
+
|
|
53
|
+
#. Default: Not a valid date input.
|
|
54
|
+
#: src/yafowil/widget/datetime/widget.py:285
|
|
55
|
+
msgid "input_not_valid_date"
|
|
56
|
+
msgstr "Not a valid date input."
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#
|
|
2
|
+
# SOME DESCRIPTIVE TITLE
|
|
3
|
+
# This file is distributed under the same license as the PACKAGE package.
|
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
|
5
|
+
#, fuzzy
|
|
6
|
+
msgid ""
|
|
7
|
+
msgstr ""
|
|
8
|
+
"Project-Id-Version: PACKAGE 1.0\n"
|
|
9
|
+
"POT-Creation-Date: 2025-10-28 10:11+0100\n"
|
|
10
|
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
11
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
12
|
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
13
|
+
"Language: \n"
|
|
14
|
+
"MIME-Version: 1.0\n"
|
|
15
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
16
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
17
|
+
"Generated-By: Lingua 4.15.0\n"
|
|
18
|
+
|
|
19
|
+
#. Default: Not a valid time input.
|
|
20
|
+
#: ./src/yafowil/widget/datetime/widget.py:41
|
|
21
|
+
msgid "input_not_valid_time"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#. Default: Failed to parse time input.
|
|
25
|
+
#: ./src/yafowil/widget/datetime/widget.py:52
|
|
26
|
+
msgid "failed_to_parse_time"
|
|
27
|
+
msgstr ""
|
|
28
|
+
|
|
29
|
+
#. Default: Hours not a number.
|
|
30
|
+
#: ./src/yafowil/widget/datetime/widget.py:61
|
|
31
|
+
msgid "hours_not_a_number"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
|
+
#. Default: Minutes not a number.
|
|
35
|
+
#: ./src/yafowil/widget/datetime/widget.py:69
|
|
36
|
+
msgid "minutes_not_a_number"
|
|
37
|
+
msgstr ""
|
|
38
|
+
|
|
39
|
+
#. Default: Hours must be in range 0..23.
|
|
40
|
+
#: ./src/yafowil/widget/datetime/widget.py:78
|
|
41
|
+
msgid "invalid_hours_range"
|
|
42
|
+
msgstr ""
|
|
43
|
+
|
|
44
|
+
#. Default: Minutes must be in range 0..59.
|
|
45
|
+
#: ./src/yafowil/widget/datetime/widget.py:84
|
|
46
|
+
msgid "invalid_minutes_range"
|
|
47
|
+
msgstr ""
|
|
48
|
+
|
|
49
|
+
#. Default: Not a valid date input.
|
|
50
|
+
#: ./src/yafowil/widget/datetime/widget.py:285
|
|
51
|
+
msgid "input_not_valid_date"
|
|
52
|
+
msgstr ""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
div.datepicker{display:none}.datepicker.active{display:block}input.datepicker.form-control-sm+button.datepicker-trigger,input.timepicker.form-control-sm+button.timepicker-trigger{--bs-btn-padding-y:0.25rem;--bs-btn-padding-x:0.5rem;--bs-btn-font-size:0.875rem;--bs-btn-border-radius:var(--bs-border-radius-sm)}.datepicker-dropdown{left:0;position:absolute;top:0;z-index:2000}.datepicker-bs-dropdown{background:none;border:0;padding:0}.datepicker-header .datepicker-controls{padding:2px 2px 0}.datepicker-header .datepicker-title{background-color:#f8f9fa;box-shadow:inset 0 -1px 1px rgba(0,0,0,.1);font-weight:700;padding:.375rem .75rem;text-align:center}.datepicker-header .datepicker-controls{display:flex;width:300px}.datepicker-header .datepicker-controls .view-switch{flex:auto}.datepicker-header .datepicker-controls .next-btn,.datepicker-header .datepicker-controls prev-btn{padding-left:.375rem;padding-right:.375rem;width:2.25rem}.datepicker-header .datepicker-controls .next-btn.disabled,.datepicker-header .datepicker-controls prev-btn.disabled{visibility:hidden}.dateinput{width:10em}.datepicker-dropdown .datepicker-picker{box-shadow:0 .5rem 1rem rgba(0,0,0,.175)}.datepicker-picker span{-webkit-touch-callout:none;border:0;border-radius:.25rem;cursor:default;display:block;flex:1;margin-bottom:5px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker-footer{background-color:#f8f9fa;box-shadow:inset 0 1px 1px rgba(0,0,0,.1)}.datepicker-controls,.datepicker-grid,.datepicker-view,.datepicker-view .days-of-week{display:flex;width:300px}.datepicker-grid{flex-wrap:wrap}.datepicker-view .days .datepicker-cell,.datepicker-view .dow{flex-basis:14.28571%}.datepicker-view.datepicker-grid .datepicker-cell{flex-basis:25%}.datepicker-cell,.datepicker-view .week{height:2.25rem;line-height:2.25rem}.datepicker-footer .datepicker-controls .btn{border-radius:.2rem;font-size:.875rem;margin:calc(.375rem - 1px) .375rem;width:100%}.datepicker-view .dow{color:var(--bs-primary)}.datepicker-view .week{color:#dee2e6;font-size:.875rem;width:2.25rem}@media(max-width:22.5rem){.datepicker-view .week{width:1.96875rem}.calendar-weeks+.days .datepicker-grid{width:13.78125rem}}.datepicker-cell:not(.disabled):hover{background-color:#f9f9f9;cursor:pointer}.datepicker-cell.focused:not(.selected){background-color:#f1f3f5}.datepicker-cell.selected,.datepicker-cell.selected:hover{background-color:var(--bs-primary);color:#fff;font-weight:600}.datepicker-cell.disabled,.datepicker-cell.next:not(.disabled),.datepicker-cell.prev:not(.disabled){color:#cdd0d4}.datepicker-cell.next.selected,.datepicker-cell.prev.selected{color:#e6e6e6}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today){background-color:#f8f9fa;border-radius:0}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused,.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#f1f3f5}.datepicker-cell.today:not(.selected){background-color:#eee}.datepicker-cell.today:not(.selected):not(.disabled){color:#000}.datepicker-cell.today.focused:not(.selected){background-color:#eee}.datepicker-cell.range-end:not(.selected),.datepicker-cell.range-start:not(.selected){background-color:#6c757d;color:#fff}.datepicker-cell.range-end.focused:not(.selected),.datepicker-cell.range-start.focused:not(.selected){background-color:#666f76}.datepicker-cell.range{background-color:#e9ecef;border-radius:0}.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#e2e6ea}.datepicker-cell.range.disabled{color:#cbd3da}.datepicker-cell.range.focused{background-color:#dadfe4}[data-bs-theme=dark] .datepicker-cell:not(.disabled):hover{background-color:#343a40;cursor:pointer}[data-bs-theme=dark] .datepicker-cell.focused:not(.selected){background-color:#495057}[data-bs-theme=dark] .datepicker-cell.selected,[data-bs-theme=dark] .datepicker-cell.selected:hover{background-color:var(--bs-primary);color:#fff;font-weight:600}[data-bs-theme=dark] .datepicker-cell.disabled,[data-bs-theme=dark] .datepicker-cell.next:not(.disabled),[data-bs-theme=dark] .datepicker-cell.prev:not(.disabled){color:#868e96}[data-bs-theme=dark] .datepicker-cell.next.selected,[data-bs-theme=dark] .datepicker-cell.prev.selected{color:#adb5bd}[data-bs-theme=dark] .datepicker-cell.highlighted:not(.selected):not(.range):not(.today){background-color:#3f454a;border-radius:0}[data-bs-theme=dark] .datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused,[data-bs-theme=dark] .datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#495057}[data-bs-theme=dark] .datepicker-cell.today:not(.selected){background-color:#4e555b}[data-bs-theme=dark] .datepicker-cell.today:not(.selected):not(.disabled){color:#fff}[data-bs-theme=dark] .datepicker-cell.today.focused:not(.selected){background-color:#4e555b}[data-bs-theme=dark] .datepicker-cell.range-end:not(.selected),[data-bs-theme=dark] .datepicker-cell.range-start:not(.selected){background-color:#343a40;color:#fff}[data-bs-theme=dark] .datepicker-cell.range-end.focused:not(.selected),[data-bs-theme=dark] .datepicker-cell.range-start.focused:not(.selected){background-color:#495057}[data-bs-theme=dark] .datepicker-cell.range{background-color:#495057;border-radius:0}[data-bs-theme=dark] .datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#6c757d}[data-bs-theme=dark] .datepicker-cell.range.disabled{color:#6c757d}[data-bs-theme=dark] .datepicker-cell.range.focused{background-color:#495057}.datepicker-cell.range-start{border-radius:.25rem 0 0 .25rem}.datepicker-cell.range-end{border-radius:0 .25rem .25rem 0}.datepicker-view.datepicker-grid .datepicker-cell{height:4.5rem;line-height:4.5rem}.datepicker-input.in-edit{border-color:var(--yafowil-accent-color,#0d6efd)}.datepicker-input.in-edit:active,.datepicker-input.in-edit:focus{box-shadow:0 0 .25em .25em rgba(102,176,255,.2)}.datetime-picker{display:flex;gap:15px}.datetime-picker .input-group{width:50%}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.timepicker-dropdown{display:none;position:absolute;z-index:1000}.timepicker-container .cell{border:2px solid transparent;border-radius:3px;cursor:pointer;display:flex;justify-content:center;padding:5px;user-select:none}.timepicker-container .cell:not(.selected):hover{background-color:#f9f9f9}.timepicker-container .cell.selected{background-color:var(--yafowil-accent-color,#0d6efd);color:var(--yafowil-accent-font-color,#fff);font-weight:600}.timepicker-container .cell.prev-selected,.timepicker-container .cell.selected{border-color:var(--yafowil-accent-color,#0d6efd)}.timepicker-container .timepicker-hours .hours-content{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.timepicker-container .timepicker-hours div.am,.timepicker-container .timepicker-hours div.pm{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr}.timepicker-container .timepicker-hours div.am{border-bottom:1px solid #e7e7e7}.timepicker-container .timepicker-hours span.am,.timepicker-container .timepicker-hours span.pm{float:left;font-size:10px;font-weight:600;padding:0 6px;position:relative;top:25px}.timepicker-container .timepicker-minutes .minutes-content{display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}[data-bs-theme=dark] .timepicker-container .cell:not(.selected):hover{background-color:#343a40}@media(max-width:575px){.timepicker-dropdown{max-width:100%}.timepicker-hours{margin-bottom:0!important}.timepicker-minutes{display:none}}@media(min-width:576px){.timepicker-hours,.timepicker-minutes{display:block!important}}
|