-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Open
Labels
area: material/datepickerdocsThis issue is related to documentationThis issue is related to documentationgemini-triagedLabel noting that an issue has been triaged by geminiLabel noting that an issue has been triaged by geminineeds triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team
Description
Documentation Feedback
The docs include this extract:
By default the LuxonDateAdapter creates dates in your time zone specific locale. You can change the default behaviour to parse dates as UTC by passing useUtc: true into provideLuxonDateAdapter:
bootstrapApplication(MyApp, { providers: [provideLuxonDateAdapter(undefined, {useUtc: true})] });
provideLuxonDateAdapter() only takes the 1 parameter, no second options with useUtc.
My guess is this is a holdover from Moment, which does have this option.
It would be nice, and fairly easy, to actually have this same option.
edit: I went ahead and made a PR copying the Moment adapter.
The current actual way to achieve it is:
bootstrapApplication(MyApp, {
providers: [
provideLuxonDateAdapter(),
{
provide: MAT_LUXON_DATE_ADAPTER_OPTIONS,
useValue: {
useUtc: true,
} satisfies Partial<MatLuxonDateAdapterOptions>,
},
]
});Affected documentation page
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: material/datepickerdocsThis issue is related to documentationThis issue is related to documentationgemini-triagedLabel noting that an issue has been triaged by geminiLabel noting that an issue has been triaged by geminineeds triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team