Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gco:date field is shown with time option #5

Open
pvgenuchten opened this issue Sep 4, 2018 · 0 comments
Open

gco:date field is shown with time option #5

pvgenuchten opened this issue Sep 4, 2018 · 0 comments

Comments

@pvgenuchten
Copy link

pvgenuchten commented Sep 4, 2018

suggestion from @josegar74:

Most date fields in the editor are handled with gn-date-picker directive, at least for 3.4.x seem possible to configure an attribute hideTimeInCalendar in the view, but requires also to enable some xslt code to handle that.

Example:

<view name="default" hideTimeInCalendar="true">

What I would do is to copy this template:

https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/layout/layout-custom-fields-date.xsl#L77-L150

To https://github.com/.../src/main/plugin/iso19139.nl.geografie.1.3.1/layout/layout-custom-fields.xsl

Doing these changes in the match and the directive section: https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/layout/layout-custom-fields-date.xsl#L124-L128

<xsl:template mode="mode-iso19139" 
                priority="2005" 
                match="gmd:CI_Date/gmd:date[$schema='iso19139.nl.geografie.1.3.1']">

  ...

   <div data-gn-date-picker="{gco:Date|gco:DateTime}" 
             data-label="" 
             data-hide-time="true" 
             data-element-name="{name(gco:Date|gco:DateTime)}" 
             data-element-ref="{concat('_X', gn:element/@ref)}">
        </div>

...

</xsl:template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant