I have this simple lightning component:
<aura:component controller="myEventController">
<aura:attribute name="newEvent" type="Event"
default="{ 'sobjectType': 'Event',
'Subject': ''}"/>
<form>
<fieldset>
<ui:inputText aura:id="evtSubj" label="Subject"
class="form-control"
value="{!v.newEvent.Subject}" required="true" />
<ui:button label="Submit" press="{!c.debugEventMethod}"/>
</fieldset>
</form>
</aura:component>
and its controller:
({
debugEventMethod: function(component, event, helper) {
var evt= component.get("v.newEvent");
alert(JSON.stringify(evt));
}
})
The values are not getting set when sobject is Event. If i try with any other object (Say Opportunity and Name field), that works. Am I doing anything wrong here or is it a limitation or bug in lightning component? Any help will be appreciated.