Try our conversational search powered by Generative AI!

Date is not coming proper when using EditorDescriptionRegistration


Hi All,

we are using below code to display dateTime calendar in CMS Edit mode.

[EditorDescriptorRegistration(TargetType = typeof(DateTime?), UIHint = "Datepicker")]
[EditorDescriptorRegistration(TargetType = typeof(DateTime), UIHint = "Datepicker")]
public class DateSelectorEditorDescriptor : EditorDescriptor
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable attributes)
base.ModifyMetadata(metadata, attributes);
ClientEditingClass = "dijit/form/DateTextBox";


This is working fine on local system when i am seleting date from Edit mode but when we are deploying this code on upper environment then date is coming as last day date. For example, if i select date as 18-jan-2018 from EditMode but system is treating this date as 17-Jan-2018.

Jan 19, 2018 7:34

Is this only happening with EditorDescriptionRegistration? Have you checked any other datetime properties rendered on the page? It sounds like it could be a confusion around timezones, since the time on the server doesn't have to be the same as on the client and the CMS UI will display the time in the timezone of the browser the editor is using - which doesn't have to be the same as what the server will render for a visitor on the site.

Jan 19, 2018 16:06

You might want to check out this thread as well:

Edited, Jan 19, 2018 16:57

Hi John,

I checked for other datetime properties and they are working fine on server. It is not about timezone of server, i already verified that. However for my solution, i used other datetime property but wanted to know why it is not working with EditorDescriptionRegistration.

Thanks for your response.

Jan 19, 2018 18:17

Good that it works for you. We havent seen it before and i tried to reproduce the problem but cant find anything for now

Jan 25, 2018 8:09

Hi Arun, 

I am facing the same issue. Can you please eloborate like how you fixed this?

Jun 16, 2021 9:49
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.