You need to sign in to do that
Don't have an account?
punith narasimha
How to Insert Date and Time field in lightning
hi
i am crated a component page with "Enter a date" is date field, 'Starttime' is time sloat now combined these 2 fields and set as date and time format in controller and want to insert a student record
component.set("v.student.Start_Date__c",------ ? ? ? -----);
please help me
Thank you
i am crated a component page with "Enter a date" is date field, 'Starttime' is time sloat now combined these 2 fields and set as date and time format in controller and want to insert a student record
component.set("v.student.Start_Date__c",------ ? ? ? -----);
please help me
Thank you
You can use the lightning:formattedDateTime as per your requirement.Please refer to the following code as it may be helpful in solving your problem:
For more information on lightning:formattedDateTime you can go through the following links:
https://developer.salesforce.com/docs/component-library/bundle/lightning:formattedDateTime/example#lightningcomponentdemo:exampleDateTimeFormatting
https://developer.salesforce.com/docs/component-library/bundle/lightning:formattedDateTime/documentation
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha