+ Start a Discussion
Surender_PatelSurender_Patel 

Lightning:InputField of date type accepting dummy text and saving as null.

Hi All,

We have a Lightning:InputField of date type. It's accepting dummy text like 'asdf' and saving as null to database. 

How can I prevent user to enter dummy text rather than a proper date?
SandhyaSandhya (Salesforce Developers) 
Hi,

Try to use <lightning:input type="date">

Best Regards,
Sandhya
mukesh guptamukesh gupta
Hi,

Please use 
<lightning:input aura:id="startDate" type="date" label="Start" name="startDate"/>

if you need any assistanse, Please let me know!!


Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh