You need to sign in to do that
Don't have an account?
Emma Brown 23
change date style to short for lightning-input-field
I am using lightning-record-edit-form to creat/update existing record. I want to show date and datetime type fields in short format to align with salesforce forms.
One option that we found is with date-style for input-field but we don't want to change the component here. We wan't to do it with lightning-input-field only.
Default date-style for lightning-input-field:
Date-style on salesforce forms:
I am trying to change date style to short for lightning-input-input field. but could not find any option to do so.
Any assistance would be greatly appreciated.
Thank you
One option that we found is with date-style for input-field but we don't want to change the component here. We wan't to do it with lightning-input-field only.
Default date-style for lightning-input-field:
Date-style on salesforce forms:
I am trying to change date style to short for lightning-input-input field. but could not find any option to do so.
Any assistance would be greatly appreciated.
Thank you
Hi Emma,
Please find the solution.
You can add style in your input.You can take reference from the below link:
https://developer.salesforce.com/docs/component-library/bundle/lightning:input/example#lightningcomponentdemo:exampleInputDateTime
or
You can create calendar : https://www.lightningdesignsystem.com/components/datepickers/
Please mark it as the Best Answer if it helps you.
Thank You