Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6750283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:47:23+00:00 2026-05-26T12:47:23+00:00

I have a custom editor template for a vehicle part that is used in

  • 0

I have a custom editor template for a vehicle part that is used in a telerik grid for insertion in mvc3 razor. The editor template includes a datetime field. On insertion of a new vehicle part the datetime field is incorrect and the format is changed.

For example, if I insert “06/10/2011” which is day 6 , month 10 and year 2011 , in the controller, the dateTime field in the model is “10/06/2011” which is day 10 month 6 and year 211. I am using telerik’s date picker

Basically the day and month are becoming switched after submitting to the controller

I have other instances in my code where I am passing a datetime field without an issue, so I believe the problem is the fact that I’m using a custom editor template …

Here is the code for the grid:

@(Html.Telerik().Grid<VehiclePartsViewModel>()
    .Name("VehiclePartsViewModel")
    .ToolBar(commands => 
    {   commands.Insert();
    })
    .DataKeys(keys => keys.Add(c => c.Id))
    .ClientEvents(events => events.OnRowDataBound("onRowDataBound"))
    .DataBinding(dataBinding => dataBinding
        .Ajax()
            .Insert(MVC.Vehicles.CustomCoverage._InsertPart().GetRouteValueDictionary())
            .Select(MVC.Vehicles.CustomCoverage._SelectPart().GetRouteValueDictionary())
            .Update(MVC.Vehicles.CustomCoverage._SavePart().GetRouteValueDictionary())
            .Delete(MVC.Vehicles.CustomCoverage._DeletePart().GetRouteValueDictionary())
        )
    .Columns(columns =>
    {
        omitted..
    })
    .Footer(false)
    .Editable(editing => editing.Mode(GridEditMode.PopUp))

The simplified editor template is :

<div>
    @Html.LabelFor(v => v.ItemId, new { @class = "uc-caption"}) &nbsp;
    @Html.EditorFor(v => v.ItemId)
</div><br />
<div>
    @Html.LabelFor(v => v.InstallDate, new { @class = "uc-caption"}) &nbsp;
    @Html.EditorFor(v => v.InstallDate, new { Modifiable = true })
</div>

I am also using an editor template for dateTime, but I do not believe the issue is here:

@( 
    Html.Telerik().DatePicker()
    .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
    .HtmlAttributes(new { id = ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty) + "_wrapper" })
    .ShowButton(true)
    .Value(Model.HasValue ? Model.Value : new DateTime())
    .ClientEvents(events => events.OnChange("onChangeDatePicker"))
    .InputHtmlAttributes(new { style = "width:100%"})
    .Enable(ViewData["Modifiable"] != null ? (bool)ViewData["Modifiable"] : true)

)

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:47:23+00:00Added an answer on May 26, 2026 at 12:47 pm

    Ok so I was finally able to resolve this with telerik .. there seems to be a problem with setting globalization to true .. You have to add a line before it .. This is what my _layout.cshtml looks like now ..

    @(Html.Telerik().ScriptRegistrar()
            .OnDocumentReady(@<text></text>) //Telerik: This is required because there is still no Telerik components on the page and jQuery(document).ready will not be rendered and the globalization will not work
            .Globalization(true)    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom editor template for input file in MVC3. I want
I have a custom datepicker control inside a grid <editor template> . It does
I have an editor template for a custom object. Inside that editor template I
I have a WinForms user control Host with a custom UI Editor. Through that
I have created a custom editor template for DateTimeOffset: @model DateTimeOffset <div> @Html.LabelFor(m =>
I have an enumeration in my project and I've created a custom editor template
I've got a custom Editor Template that is essentially: <div id=control> <%: Html.DropDownListFor(model =>
I am aware that in a custom display or editor template I can get
I have an editor template for a custom object. Pretty basic - just has
I have custom classes that I currently instantiate within App.xaml as resources. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.