cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom Date Editor View Incorrect

Former Member
0 Likes
675

Hey Guys,

Had a requirement for which I created a CustomDateEditor which extends DefaultDateEditor. I am overridding the method initTimezoneManagement() to have some custom code in it.

I am using this editor for a date attribute for a certain type in myextension-backoffice-config.xml .

Since I am extending the default date Editor i was expecting to render it in the same view but i am gettting the output as below.

Any idea why this would be happening?

Any help will be much appreciated.

Thank You

I am getting the correct output value but the view is coming distorted.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member780778
Discoverer
0 Likes

I had the same issue and I fixed it by adding the 'extends' attribute to editor-definition in definition.xml:

<editor-definition id="yourCustomDateEditor" extends="com.hybris.cockpitng.editor.defaultdate"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.hybris.com/schema/cockpitng/editor-definition.xsd">
...
</editor-definition>
Former Member
0 Likes

You will have to modify the styles associated as well. It appears your custom editor requires more space for the date field. You can open the browser where this displays correctly (non-customized) and look for styles that are at play using developer tools of your browser to pinpoint which needs to be changed.

Former Member
0 Likes

I havent created any new view for it given that I have extended DefaultDateEditor that uses DateBox component of zkoss. I am just setting timezone by overriding a method.

I will check the styles but I was expecting it to look as the default date editor renders.