Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I'm trying to use the date picker but cannot link the capabilities.json type to the Date type variable in the value, so even though I can select a date in the format pane, it won't save like other parameters.
In settings.ts the code is :
payRefDate = new formattingSettings.DatePicker({
placeholder: "Pay Period Reference Date",
name: "payRefDate",
displayName: "Pay period start",
description: "Pay period seed reference date from which to start the repeating period",
value: new Date(2023,0,1) // this does not initialise the picker
});
and the capabilities.json has (unsatisfactorily):
"pay": {
"properties": {
"payRefDate": {
"displayNameKey": "payRefDate",
"type": {"text": true}
}
}
}
How do I access the extended ValueTypeDescriptor types in capabilites.json or is there a simpler way to get the date picker to work?
Hi @_os21
This is an interesting one. I haven't tried it yet, but have had a look following your post, and have drawn the same conclusions as you, I think.
The permitted property types in capabilities.json are fairly primitive, and date is not a supported type in here. It's not possible to include conditional formatting measures that use the date or date/time data type either (just text or numeric).
You may be better contacting the team - pbicvsupport@microsoft.com - for clarification on whether this is actually supported, and if so, whether they have any guidance that they can offer on it.
Regards,
Daniel
P.S. here's my research, just to see if it lines up with yours:
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Thanks for this... the doc points one to the github so it's "sort of" documented! The whole formattingModel & PBIVIZ stuff is terribly documented... confused and inconsistent.