You need to sign in to do that
Don't have an account?
IKZ
Getting Intl.DateTimeFormat error when primary tab in console does not load correctly
In lightning tables we have below attributes to determine if field is datetime or just date:
But I don't understand what else can be used if that’s the IF condition to determine if it’s datetime field or just date field?
Any help would be grately appreciated
"typeAttributes": { "includesTime" : true, "year": "numeric", "month": "short", "day": "numeric", "hour": "2-digit", "minute": "2-digit" }but sometimes, when the primary tab table won't load correctly (which looks like SF bug anyway) we get the [Value null out of range for Intl.DateTimeFormat options property hour] error . Sf support is saying that because our code below return null value which is a bad practice, as lightning:formattedDateTime does not expect nulls. They recommend to update this to a non-null value.
public class LightningTableTypeAttributes{ @AuraEnabled public Boolean includesTime; @AuraEnabled public String hour { get { return includesTime != null && includesTime ? '2-digit' : null; } }
But I don't understand what else can be used if that’s the IF condition to determine if it’s datetime field or just date field?
Any help would be grately appreciated