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

The specified value "02/05/2019" does not conform to the required format, "yyyy-MM-dd"

6 Answers 9031 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Douglas
Top achievements
Rank 1
Veteran
Douglas asked on 15 Apr 2021, 04:10 PM

Good afternoon, I am not able to make my Html.Kendo (). DatePicker () stay with the date format in "dd / MM / yyyy"

 

            @(Html.Kendo().DatePicker()
                                  .Name("DataAdmissao")
                                  .Culture("pt-BR")
                                  .Value(ViewBag.Dataadmissao)
                                  .Format("dd/MM/yyyy")
                                  .HtmlAttributes(new { style = "width:220px;" }))

        </div>

he returns me the following message and does not show the date  " Index:34 The specified value "02/05/2019" does not conform to the required format, "yyyy-MM-dd" "

 

 

 

6 Answers, 1 is accepted

Sort by
0
Douglas
Top achievements
Rank 1
Veteran
answered on 15 Apr 2021, 07:46 PM

Even if I force culture on web.config it doesn't work

  <system.web>
    <globalization culture="pt-BR" uiCulture="pt-BR" enableClientBasedCulture="false" />

0
Tsvetomir
Telerik team
answered on 20 Apr 2021, 06:34 AM

Hi Douglas,

In general, the cultures for the Kendo UI widgets come from custom JavaScript files that are included in the project only if you have installed the library from the NuGet feed. Therefore, if you do not have the JavaScript files, you should include them in the application and reference them on your page. 

After that, you should set the client-side and server-side cultures to be matching. More information can be found here:

https://docs.telerik.com/aspnet-mvc/globalization/overview#setting-matching-client-side-cultures

Let me know if the issue persists after applying the suggestions from the article above.

 

Kind regards,
Tsvetomir
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
Douglas
Top achievements
Rank 1
Veteran
answered on 20 Apr 2021, 11:15 AM
ok,thank you , a question i have an Html.Kendo (). DateTimePicker (), and it works normally, but anyway I will check the files
0
Douglas
Top achievements
Rank 1
Veteran
answered on 20 Apr 2021, 11:56 AM
I found the files and made a reference, but it still doesn't work
0
Douglas
Top achievements
Rank 1
Veteran
answered on 20 Apr 2021, 11:58 AM
another image
0
Tsvetomir
Telerik team
answered on 23 Apr 2021, 08:37 AM

Hi Douglas,

Based on the provided information so far, I have created a sample project with the specific culture. It appears that the warning message that you observe in the console does not appear in the console of the project on my side.

Can you take a look at the attached project and confirm this? It would be helpful if you could modify it in order to replicate the defect and send it back to me.

Looking forward to your reply.

 

Regards,
Tsvetomir
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Date/Time Pickers
Asked by
Douglas
Top achievements
Rank 1
Veteran
Answers by
Douglas
Top achievements
Rank 1
Veteran
Tsvetomir
Telerik team
Share this question
or