ericrsmith35 / DatatableV2

28 stars 24 forks source link

Can't display the weekday in a date field (v2.46) #62

Closed egyptguy closed 3 years ago

egyptguy commented 3 years ago

I've been reading the documentation for how to format a date field to show a weekday, which is all over the documentation and screenshots, but no matter what I do the weekday won't display in the field value.

My value for Special: Column TypeAttributes (the below correctly displays everything except for the weekday): Event_Date__c:{year:'numeric', day:'2-digit', month:'long', weekday:'long'}

Eric, saying I love this component is a gross understatement - I use it in just about every Salesforce demo and I have it all over the place in production at a food pantry I volunteer with... this fills a very deep need we have in the platform, kudos for building it, I'm sure it's a labor of love!

ericrsmith35 commented 3 years ago

Leave out the quotes and see if this work for you: Event_Date__c:{year:numeric, day:2-digit, month:long, weekday:long}

egyptguy commented 3 years ago

@ericrsmith35 I just tried it as provided and there's no change.

ericrsmith35 commented 3 years ago

In order to display the correct date based on the user's timezone, I handle all dates as date-local. The base datatable component in Salesforce only supports formatting for Month, Day and Year for date-local values. You could try a datetime field to see if that lets you provide the formatting you're looking for.

https://unofficialsf.com/convert-date-to-datetime-flow-action/

ericrsmith35 commented 3 years ago

This has been corrected in the latest release. v3.0.10 2/27/21 https://unofficialsf.com/datatable-lightning-web-component-for-flow-screens-2/