Lightning-Input-field with Date/Time type display distorted values in iOS
Last updated 17 days ago ·Reference W-9340770 ·Reported By 0 users
In Review
Summary
Lightning-Input-field with Date/Time type display distorted values only in iOS, works fine in android and desktop.
Issue happen on some combination of date-time, for example, you notice the issue for 12:00 AM May 30, but not on 12:00 AM May 1.
Repro
1) Deploy below LWC to a fresh org
HTML
----
<template>
<lightning-record-edit-form object-api-name="Contact" onsuccess={handleSuccess} onsubmit ={handleSubmit}>
<lightning-input-field field-name='StartDateTime__c'></lightning-input-field>
</lightning-record-edit-form>
</template>
---
JS
---
import { LightningElement } from 'lwc';
export default class recordEditFormComp extends LightningElement {}
---
METADATA XML
---
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">;
<apiVersion>48.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
</targets>
<targetConfigs>
<targetConfig targets="lightning__RecordPage">
<supportedFormFactors>
<supportedFormFactor type="Large"/>
<supportedFormFactor type="Small"/>
</supportedFormFactors>
</targetConfig>
</targetConfigs>
</LightningComponentBundle>
---
2) Create custom datatime field on Contact Object
Field name is "StartDateTime__c"
3) Create Lightning Record Page, locate created LWC
Type : Record Page
Layout : One Region
Object : Contact
4) Activate the Record Page for Desktop and Phone form factors, then [Save]
Repro step:
1) Open iOS [Settings] -> [General] -> [Date & Time], disable 24-hour time
2) Please use Salesforce App for iOS, any version.
3) Menu -> Contacts tab, open any contact record
4) Tap Date Time field,
5) On datetime picker, select 2 digit number for hour and "AM", tap [OK]
Issue not occur for some date time.
In order to make the issue happen for Summer 21, please set below date time in MAY
Time : 12:00 AM
Day : 20,22,23,24,26,28,29,30
5) Notice unexpected break line in the DateTime field.
Workaround
NA
Reported By (0)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.
