Extended bootstrap.datepicker for custom formatting option (#9645)

* bootstrap.datepicker: added property assumeNearbyYear to DatepickerOptions

* bootstrap.datepicker: formatting

* Extended bootstrap.datepicker with custom formatting option: https://bootstrap-datepicker.readthedocs.io/en/stable/options.html#format
This commit is contained in:
philippdrebes
2016-06-19 03:28:55 +02:00
committed by Masahiro Wakame
parent 62fcf9596e
commit 8a7cc0615e

View File

@@ -15,7 +15,7 @@
* http://bootstrap-datepicker.readthedocs.org/en/release/options.html
*/
interface DatepickerOptions {
format?: string;
format?: string | DatepickerCustomFormatOptions;
weekStart?: number;
startDate?: any;
endDate?: any;
@@ -38,6 +38,11 @@ interface DatepickerOptions {
assumeNearbyYear?: any;
}
interface DatepickerCustomFormatOptions {
toDisplay?(date: string, format: any, language: any): string;
toValue?(date: string, format: any, language: any): Date;
}
interface DatepickerEventObject extends JQueryEventObject {
date: Date;
format(format?: string): string;