Skip to content

Commit

Permalink
preparation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mds92 committed Oct 2, 2021
1 parent 94afe98 commit 8344f8e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
demo/
images/
.vscode/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Name | Values | Description | Sample
**selectedDateToShow** | [new Date()], Date | Selected date to start calendar from it as JavaScript Date object | new Date('2018/9/30')
**selectedRangeDate** | Array: Date[] | Selected range date as JavaScript Date object | [new Date('2020/8/5'), new Date('2020/8/15')]
**yearOffset** | Number | Number of years to select in year selector | 30
**holiDays** | Array: Date[] | Array of holidays to show in date time picker as holiday | [new Date(), new Date(2017, 3, 2)]
**holidays** | Array: Date[] | Array of holidays to show in date time picker as holiday | [new Date(), new Date(2017, 3, 2)]
**disabledDates** | Array: Date[] | Array of disabled dates to prevent user to select them | [new Date(2017, 1, 1), new Date(2017, 1, 2)]
**specialDates** | Array: Date[] | Array of dates to mark some dates as special | [new Date(2017, 2, 1), new Date(2017, 3, 2)]
**disabledDays** | Array: number[] | Array of disabled week days to prevent user to select them | Disable all "Thursday", "Friday" in persian [ 5, 6 ]
Expand Down Expand Up @@ -115,7 +115,7 @@ Name | Return Value | Description | Sample
**getBsModalInstance** | bootstrap.Modal | return instance of bootstrap modal | const bsModal = dtp1Instance.getBsModalInstance()
**updateOption** | void | update one option of date picker | dtp1Instance.updateOption('isGregorian', false)
**updateOptions** | void | update one option of date picker | dtp1Instance.updateOptions({ isGregorian: false, inLine: false, ... })
**getInstance** | MdsPersianDateTimePicker | static method, get instance of MdsDatePicker by an element obj | const jalaliObj = mds.MdsPersianDateTimePicker.getInstance(document.getELementById('IdOElement'));
**getInstance** | MdsPersianDateTimePicker | static method, get instance of MdsDatePicker by an element obj | const jalaliObj = mds.MdsPersianDateTimePicker.getInstance(document.getELementById('IdOfElement'));
**getText** | string | Get selected date text | const txt = dtp1Instance.getText()
**getDate** | Date | Get selected date | const dateObj = dtp1Instance.getDate()
**getDateRange** | [fromDate, toDate]: Date[] | Get selected date range | dtp1Instance.getDateRange();
Expand Down
2 changes: 1 addition & 1 deletion dist/mds.bs.datetimepicker.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"style-loader": "^2.0.0",
"ts-loader": "^9.2.6",
"typescript": "^4.4.3",
"webpack": "^5.53.0",
"webpack": "^5.56.0",
"webpack-cli": "^4.8.0",
"webpack-dev-server": "^3.11.2",
"webpack-merge": "^5.8.0",
Expand Down
4 changes: 2 additions & 2 deletions src/mds.bs.datetimepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,7 @@ data-bs-toggle="dropdown" aria-expanded="false">
/**
* تبدیل آبجکت تاریخ به رشته
* @param date آبجکت تاریخ
* @param isGregorian آیا تاریخ تبدیل به شمسی شود و نمایش داده شود یا خیر
* @param isGregorian آیا تاریخ میلادی مد نظر است یا تبدیل به شمسی شود
* @param format فرمت مورد نظر برای تبدیل تاریخ به رشته
*/
static convertDateToString = (date: Date, isGregorian: boolean, format: string): string => {
Expand All @@ -2188,7 +2188,7 @@ data-bs-toggle="dropdown" aria-expanded="false">
* تبدیل آبجکت تاریخ به شمسی
* @param date آبجکت تاریخ
*/
static convertDateToJalali = (date: Date): MdsPersianDateTimePickerConvertedDateModel => {
static convertDateToJalali = (date: Date): MdsPersianDateTimePickerConvertedDateModel => {
const dateTimeJson1 = MdsPersianDateTimePicker.getDateTimeJson1(date);
const jalaliJsonModel = MdsPersianDateTimePicker.toJalali(dateTimeJson1.year, dateTimeJson1.month, dateTimeJson1.day);
return {
Expand Down

0 comments on commit 8344f8e

Please sign in to comment.