This is a migrated thread and some comments may be shown as answers.

Using DateInput vue component as native date on smartphones

5 Answers 73 Views
DateInput
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Veteran
Ron asked on 03 Nov 2020, 07:00 PM

Hello,
We use kendo for Vue and tried implementing a DateInput element in our Vue app.


When we try to use this element on a smartphone, we hoped it will use the OS date input, just like it works with any <input> element of type “date”. But we found it is rendered as type “text”.


This means the UX is not as good as we hoped it will be.
Is there a way to render it as <input> of type “date” so it will behave accordingly?

https://www.telerik.com/kendo-vue-ui/components/dateinputs-wrapper/dateinput/

 

Thanks,

Ron.

5 Answers, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 06 Nov 2020, 01:49 PM

Hi Ron,

The DateInput, by design, doesn't change its behavior on a mobile device. 

I am not sure what is the exact scenario that you expect to have in your application but if it requires a date to be picked, you can check the DatePicker component. We have two versions of it:

Let me know if the suggested above component is what you need for your application.

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Ron
Top achievements
Rank 1
Veteran
answered on 06 Nov 2020, 04:02 PM

Thanks Petar,

This does not answer our need, which is rather simple.
In your suggestions the UI renders text input and the user needs to type the date. This is because those options use <input type=“text”>
If you’ll go to any site with your smartphone and click any input of type date, as in <input type=“date”> you will see the user does NOT need to type anything. Instead the site will present the smartphone date selection. This is basic HTML and I want to understand if you offer any date component (not picker) that actually uses input of type date and not of type string. This will give a much better and up-to-date UX, as users are not used to type dates, but to select dates.

 

Ron.

0
Petar
Telerik team
answered on 10 Nov 2020, 11:46 AM

Hi Ron.

This the design of the DatePicker component. Its idea is to give the users the freedom to manually enter data or to pick one from the calendar that appears once the icon on the right is clicked. 

What I can suggest as a possible solution is to use the DatePicker as it is demonstrated in this StackBlitz example. Using the below CSS, the input of the DatePicker is hidden and the user can only interact with the calendar. 

.k-dateinput {
  display: none;
}

.k-datepicker {
  height: 30px;
  width: 30px;
}

Another approach you can try is to display the Kendo UI for Vue DatePicker to the desktop users and the native "type='date'" for the mobile ones. This can be implemented using the approach in this discussion

If you want, you can submit a feature request about a configuration in the DatePicker that makes the component mobile. This Feature request can be submitted in our Feedback portal

Let me know if you have additional questions related to the current thread.

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Ron
Top achievements
Rank 1
Veteran
answered on 10 Nov 2020, 03:14 PM

Thanks Petar,

The idea was to use Kendo date input component (vue) that handles date natively using the HTML standard of <input type=“date”>
We do not want to use date picker (as the smartphone OS handles this better) and the second suggestion does not show any kendo component that answers this need.

So I assume there is simply no such component.

Thanks for the assistance,

0
Petar
Telerik team
answered on 12 Nov 2020, 10:01 AM

Hi Ron,

Yes, currently we don't have a component that matches your requirements. The idea of my last reply was to show you an approach that could be similar to what you need.

I will close the current thread. If you have additional questions about it, you can reopen it and continue the communication. 

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
DateInput
Asked by
Ron
Top achievements
Rank 1
Veteran
Answers by
Petar
Telerik team
Ron
Top achievements
Rank 1
Veteran
Share this question
or