Version
| Version | Functional Change |
|---|---|
| 11.0 | Difference from V10.0: Added the setMaxAndMinDate and setPopupStyle APIs. |
| 11.0.16 | The setMaxAndMinDate API is supported in FineReport with the FineVis Data Visualization plugin of V2.1.0 and later versions. |
Before API use, read JS API Compatibility Description carefully. APIs are supported in both general reports and dashboards (new version) by default.
setMaxAndMinDate
| API | setMaxAndMinDate(Date) | To set the selectable date range of the date widget. |
|---|---|---|
| Parameter | Date: { max: string | Date; min: string | Date; } | Start date and end date (in JSON format). max: End date, which can be a string or a date in the yyyy-mm-dd HH:mm:ss format. min: Start date, which can be a string or a date in the yyyy-mm-dd HH:mm:ss format. |
| Returned Value | void | |
| Example | Example 1: You can set the selectable date range to 2021-09-01 to 2021-09-08 when the obtained date widget object is defined as dateEditor. Example 2: In a general report, you can set the selectable range of the date widget dateEditor0 on the parameter panel to 2021-09-01 to 2021-09-08. Example 3: In a general report, you can set the selectable range of the date widget dateEditor0 in a data entry cell to 2021-09-01 to 2021-09-08. Example 4: In an FVS visualization dashboard, you can click the title to set the selectable range of the date widget to 2021-09-01 to 2021-09-08. Example 5: In a dashboard, you can set the selectable range of the date widget dateEditor0 in body to 2021-09-01 to 2021-09-08. Note: | |
Application Example | You can set the selectable range of the date widget dateEditor0 on the parameter panel to 2021-09-01 to 2021-09-08. For details, you can download the template Setting the Selectable Range of a Date Widget.cpt. FVS visualization dashboard: Setting the Selectable Range of Date Widget by JS.fvs.
| |
| Mobile Terminal | This API is supported on mobile terminals. | |
setPopupStyle
Note: | API | setPopupStyle(PopupStyle) | To set the pop-up box style for the date widget. |
|---|---|---|
| Parameter | PopupStyle: { itemHeight: string; fontSize: string; } | The style of the pop-up box, which is in JSON format. itemHeight: cell height in the pop-up box fontSize: font size of the dates in the pop-up box |
| Returned Value | void | |
| Example | Example 1: You can set the cell height to 10 px and font size to 10 px for the pop-up box when the obtained drop-down box widget object is defined as widget.Example 2: You can get the date widget dateEditor0 on the parameter panel, and set the cell height to 10 px and font size to 10 px for the pop-up box. Example 3: In a general report, you can get the date widget dateEditor0 in a data entry cell, and set the cell height to 10 px and font size to 10 px for the pop-up box. Example 4: In a dashboard, you can get the date widget dateEditor0 in body, and set the cell height to 10 px and font size to 10 px for the pop-up box. Note: | |
Application Example | You can modify the cell height to 10 px and font size to 10 px for the pop-up box of the date widget dateEditor0. For details, you can download the template Modifying the Date Widget Style.cpt.
| |
| Mobile Terminal | This API is not supported on mobile terminals. | |