Open danblah opened 3 years ago
This seems to be a wagtail bug. The jQuery date picker that wagtail uses clash with the browsers built in one.
@Parbhat Any ideas here?
@frjo Yeah looks like a Wagtail bug. Also can not find the fix in the latest releases. We should report it to the Wagtail repo.
@Parbhat Thanks, I will report it.
Turns out to be a Hypha issue. The scheduled publishing date fields use this template hypha/templates/django/forms/widgets/datetime.html
. Removing that solves the issue.
@Parbhat Ideas how to fix this in a nice way? Can we make this field use the default template instead?
{'name': 'go_live_at', 'is_hidden': False, 'required': False, 'value': None, 'attrs': {'autocomplete': 'off', 'id': 'id_go_live_at'}, 'template_name': 'wagtailadmin/widgets/datetime_input.html', 'type': 'text', 'config_json': '{"dayOfWeekStart": 0, "format": "Y-m-d H:i", "formatTime": "H:i"}'}
@frjo Thanks for looking into it closely. I don't know the context why we are overriding these django widget templates. Can we try to use the overriden templates only where required instead of changing the default template?
@frjo @Parbhat We are using customised django forms widget templates date.html
and datetime.html
in apply funds, projects(start/end proposing dates) and many other places. And internally, wagtail is also using the django forms widget templates. That's why it is showing both of the designs.
So now we have two cases:
Which one looks better to you?
I think the best is to use standard Wagtail date/datetime widget in Wagtail admin. The custom one we only use in Hypha itself.
That should resolve this bug.
I believe it is a good point to have Wagtail use its defaults as much as possible.
Entering in date works and as soon as you move away it clears