Click or drag to resize
DateTimePickerSettingsProvider Constructor
Constructor, creates instance of DateTimePickerSettingsProvider.

Namespace: CMS.WebAnalytics
Assembly: CMS.WebAnalytics (in CMS.WebAnalytics.dll) Version: 9.0.0
Syntax
C#
public DateTimePickerSettingsProvider(
	ILocalizationService localizationService
)

Parameters

localizationService
Type: CMS.CoreILocalizationService
Service for strings localization
Exceptions
ExceptionCondition
ArgumentNullExceptionlocalizationService is null
Examples
This example shows how to use the settings when calling angular cms-date-time-picker component.
service.cs

var settingsProvider = new DateTimePickerSettingsProvider(localizationService);
var settings = JsonConvert.SerializeObject(settingsProvider.GetDateTimePickerSettings(culture, currentDateTime));

... pass settings to the client


controller.js
$scope.settings = getSettingsFromServer();


markup.aspx
<cms-date-time-picker settings="{{settings}}"></cms-date-time-picker>
See Also