Forum Discussion
Custom Visual - how to define formattingSettings.DatePicker in capabilities.json
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 - [email protected] - 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:
- With the new formatting cards (introduced in API 5.1), the data picker is not listed in the supported control types for property slices in the documentation, although there is a definition in the API for it.
- Best I can tell is if you create a property with type "text", you can create a slice that utilises FormattingComponent.DatePicker, but it doesn't seem to work well, so I would assume that it's not yet fully supported. For example, this presents the date picker control:
- And this will store a value in the data view (but this is a stringified date/time), e.g.:
- However, this does not parse back when processing the settings, so it looks like the types are not compatible.
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.