umbraco / Umbraco.Forms.Issues

Public issue tracker for Umbraco Forms
29 stars 0 forks source link

Date field type can not render date picker on UI V14.0.2 #1240

Closed NguyenThuyLan closed 3 days ago

NguyenThuyLan commented 1 week ago

A brief description of the issue goes here.

Reproduction

If you're filing a bug, please describe how to reproduce it. Include as much relevant information as possible, such as:

Bug summary

Date field type can not render DatePicker on UI V14.0.2, only an input text is displayed and the user can enter any characters.

Specifics

I have a Form, that's having a Date field Type, when showing at UI, Date field does not have DatePicker

image

Steps to reproduce

  1. Create a Form
  2. Choose a Date field type to Form
  3. Show Form at UI site

https://github.com/umbraco/Umbraco.Forms.Issues/assets/116753400/f574a115-290f-4c01-9696-a6df9407a06e

Expected result

Date field should have DatePicker that user can pick a date

Actual result

Date field has no DatePicker and user can input any characters


This item has been added to our backlog AB#41983

AndyButland commented 3 days ago

I think the problem here is that you aren't outputting the scripts on the page, which you will need for the date field as it pulls in some additional client-side assets.

If you add the following to your template, I think you should find it working:

@addTagHelper *, Umbraco.Forms.Web

@Html.RenderUmbracoFormDependencies(Url)

<umb-forms-render-scripts theme="default" />

For more details, please see: https://docs.umbraco.com/umbraco-forms/developer/rendering-scripts

NguyenThuyLan commented 3 days ago

Thanks @AndyButland , it works now, you can close this issue