Hi experts,I am trying to very simple aikau form with two date controls init.When a add date controls, the other controls loosing their "Label" and I am able to see null reference error in the browser console."Uncaught TypeError: Cannot read property 'getFullYear' of null"I am using Alfresco Enterprise 5.0.2 and I tested this issue IE 9 and Chrome 45.Here is the code.<strong> student.get.js </strong>
var site = page.url.templateArgs.site;
var alfDestination = null;
var result = remote.call("/slingshot/doclib/container/"+site+"/documentLibrary");
if (result.status.code == status.STATUS_OK)
{
alfDestination = JSON.parse(result).container.nodeRef;
}
var date = new Date().toISOString();
var date1 = new Date().toISOString();
//Create the form control for the student
var studentFormWidget = [{
name : "alfresco/forms/controls/TextBox",
config : {
requirementConfig : {
initialValue : false
},
name : "prop_student_name",
label:"Student Name"
}
},
{ name : "alfresco/forms/controls/DateTextBox",
config : {
requirementConfig : {
initialValue : false
},
value : date,
name : "prop_studnet_dob",
label:"Date of Birth"
}
},
{
name : "alfresco/forms/controls/DateTextBox",
config : {
requirementConfig : {
initialValue : false
},
value : date1,
name : "prop_studnet_doj",
label:"Date of Join"
}
}
];
//Create the form here
var form = {
name: "alfresco/forms/Form",
config: {
showOkButton: true,
okButtonLabel: "Save",
showCancelButton: false,
cancelButtonLabel: "",
okButtonPublishTopic: "ALF_CRUD_CREATE",
okButtonPublishGlobal: true,
okButtonPublishPayload: {
url: "api/type/student%3AstudentFolder/formprocessor",
alf_destination:alfDestination
},
widgets: studentFormWidget
}
};
model.jsonModel = { widgets: [ form ], services: ["alfresco/services/CrudService"] };
<strong> student.get.html.ftl </strong>
<@processJsonModel group="share"/>
<strong> student.get.desc.xml </strong>
<webscript>
<shortname>CRUD Service to read create and read Student entry</shortname>
<family>Aikau Share</family>
<url>/studentCreate</url>
</webscript>