DateTimePickerSettingsProvider Constructor |
Namespace: CMS.WebAnalyticsAssembly: CMS.WebAnalytics (in CMS.WebAnalytics.dll) Version: 12.0.0
Syntax public DateTimePickerSettingsProvider(
ILocalizationService localizationService
)
Parameters
- localizationService
- Type: CMS.CoreILocalizationService
Service for strings localization
Exceptions 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