ripple-framework icon indicating copy to clipboard operation
ripple-framework copied to clipboard

formatDate doesn't allow Intl.DateTimeFormat options

Open waitingallday opened this issue 1 year ago • 0 comments

We are setting dateStyle as a default param, this prevents the use of any non-dateStyle formatting options

e.g.

formatDate(opt.date, { year: '2-digit' })

// returns Can't set option year when dateStyle is used

https://github.com/dpc-sdp/ripple-framework/blob/736ce3b7df59f5c1c2c141adbc7f448d29334e59/packages/ripple-ui-core/src/lib/helpers.ts#L18

waitingallday avatar Dec 04 '23 07:12 waitingallday