Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 1.6 KB

File metadata and controls

66 lines (47 loc) · 1.6 KB

BootstrapDatepicker

Wraps bootstrap-datepicker which provides a flexible datepicker widget in the Bootstrap style.

Control also contains all locales, that can be enabled during initialization.

Initialize control

You can specify additional locales to be initialized - default locale is 'en' (English).

// default - only en locale is available, no additional locales as initialized
config.AddContribBootstrapDatepickerConfiguration();

// selected locales - available locales are: en, cs, fr
config.AddContribBootstrapDatepickerConfiguration(new[] { "cs", "fr" });

Sample 1: Basic usage

Control requires Date property - can be nullable.

<dc:BootstrapDatepicker
    Date="{value: SelectedDate}"
    />

Sample 2: Language property

Control has Language property - can be set to any locale, that was initialized.

Language is automatically determined from CurrentUICulture, when Language property is omitted.

<dc:BootstrapDatepicker
    Date="{value: SelectedDate}"
    Language="cs"
    />

<dc:BootstrapDatepicker
    Date="{value: SelectedDate}"
    Language="{resource: CurrentLanguage}"
    />

Sample 3: Markup

input

<dc:BootstrapDatepicker Date="{value: SelectedDate}" class="form-control" />

component

<div class="input-group date">
    <dc:BootstrapDatepicker Date="{value: SelectedDate}" class="form-control" />
    <div class="input-group-append">
        <span class="btn btn-primary"><i class="fas fa-calendar-alt"></i></span>
    </div>
</div>