Click or drag to resize
DateTimePickerSettingsProviderGetDateTimePickerSettings 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.GlobalizationCultureInfo
Culture for which the settings will be evaluated
currentSite
Type: CMS.SiteProviderSiteInfo
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: SystemDateTime
Current date time for the site. Should be already shifted by timezone, if necessary

Return Value

Type: Object
Settings object suitable for serialization

Implements

IDateTimePickerSettingsProviderGetDateTimePickerSettings(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