You need to sign in to do that
Don't have an account?

Lightning - Expense tracker -
Hi,
i have a Problem. My Button dont fired.
When I turn on the console.log(amt) after amtField.get("Value") nothing happens. Why?
The calendar will not open. Why?
thanks
i have a Problem. My Button dont fired.
When I turn on the console.log(amt) after amtField.get("Value") nothing happens. Why?
The calendar will not open. Why?
thanks
sorry, still does not fired my button.
The Code is:
form.cmp
<ui:button aura:id="buttons" label="Submit" press="{!c.createExpense}"/>
formController.js
createExpense : function(component, event, helper) {
var amtField = component.find("amount");
var amt = amtField.get("v.value");
if (isNaN(amt)||amt==''){
amtField.setValid("v.value", false);
amtField.addErrors("v.value", [{message:"Enter an expense amount."}]);
}
else {
amtField.setValid("v.value", true);
var newExpense = component.get("v.newExpense");
helper.createExpense(component, newExpense);
}
},
Can you help me?