mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-30 23:30:06 +00:00
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:
committed by
Masahiro Wakame
parent
62fcf9596e
commit
8a7cc0615e
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user