cancel
Showing results for 
Search instead for 
Did you mean: 

Model with date-Properties doesnt work

chocox
Champ in-the-making
Champ in-the-making
Hello 2gether,

i have the strange behaviour, that i cant edit properties from a Content-Type which are from type d:date
Content-Model:

            <property name="bs:startdate">
           <title>Start Date</title>
           <type>d:date</type>
       
                  </property>


If i want to edit the property, i get following exception:

org.alfresco.service.cmr.repository.datatype.TypeConversionException: The property value is not compatible with the type defined for the property:
  
    value: 2013-12-19
    value type: class java.lang.String


Knows anybody the problem?
4 REPLIES 4

kaynezhang
World-Class Innovator
World-Class Innovator
How did you edit the property? through api? through explorer? or through share?

mrogers
Star Contributor
Star Contributor
Also what locale are you using?    Date to string conversion depends upon your locale.

dev
Champ in-the-making
Champ in-the-making
Hi,

I am trying to add a date field to my workdesk through the content model. In my content model, I have added a property with type d:date.

But when I select the date, it always comes up in the format MM/DD/YYYY hh:mm. I do not want the time to be there in the date when I select it.

How can this be done. Please help

chocox
Champ in-the-making
Champ in-the-making
I edit the property trough share…

My Implementation is quit simple. I have a custom Model and a custom Model Form:


<config evaluator="node-type" condition="bs:rechnung">
      <forms>
         <form>
            <field-visibility>
               <show id="bs:startdate" />[….]…..
                                 </field-visibility>


If i add content of the custom content type and i want to edit the properties in share i get the exception (but only if i set the date-property)