Click or drag to resize
DateTimePickerSettingsProvider.GetDateTimePickerSettings Method
Get dictionary containing all culture dependent settings needed by cmsdatepicker component, as well as timezone dependent labels.

Namespace: CMS.WebAnalytics
Assembly: CMS.WebAnalytics (in CMS.WebAnalytics.dll) Version: 12.0.0
Syntax
C#
public Object GetDateTimePickerSettings(
	CultureInfo culture,
	SiteInfo currentSite,
	DateTime currentDateTime
)

Parameters

culture
Type: System.Globalization.CultureInfo
Culture for which the settings will be evaluated
currentSite
Type: CMS.SiteProvider.SiteInfo
Reference to the executing site. This information is needed, because current time for the datepicker is retrieved based on the site time zone
currentDateTime
Type: System.DateTime
Current date time for the site. Should be already shifted by timezone, if necessary

Return Value

Type: Object
Settings object suitable for serialization

Implements

IDateTimePickerSettingsProvider.GetDateTimePickerSettings(CultureInfo, SiteInfo, DateTime)
Exceptions
ExceptionCondition
ArgumentNullExceptionculture or currentSite is null
Remarks
Settings are suitable for serialization using Newtonsoft.Json. For example, please refer to DateTimePickerSettingsProvider. This service is directly dependent on the TimeZoneHelper class.
See Also