Format Datepicker

Stimulsoft Dashboards.WEB discussion
Post Reply
liteng
Posts: 2
Joined: Fri Jul 30, 2021 3:19 pm

Format Datepicker

Post by liteng » Tue Aug 03, 2021 11:26 am

How to format dashboaed datepicker date format to "dd/MM/yyyy" in c# code?

I did it as below, but it doesn't work
StiDatePickerElement datePickerElement = report.GetComponents()["DatePicker1"] as StiDatePickerElement;
datePickerElement.TextFormat = new Stimulsoft.Report.Components.TextFormats.StiDateFormatService("dd/MM/yyyy", String.Empty);
Lech Kulikowski
Posts: 3939
Joined: Tue Mar 20, 2018 5:34 am

Re: Format Datepicker

Post by Lech Kulikowski » Wed Aug 04, 2021 1:11 pm

Hello,

Please check the following code:
(report.GetComponentByName("DatePicker1") as StiDatePickerElement).TextFormat = new Stimulsoft.Report.Components.TextFormats.StiDateFormatService("dd/MM/yyyy", " ");

Thank you.
Post Reply