Skip to content

Commit 94afe98

Browse files
committed
preparation
1 parent 7e5bd57 commit 94afe98

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Bootstrap 3 version `https://github.com/Mds92/MD.BootstrapPersianDateTimePicker/
1818
Bootstrap 4 version `https://github.com/Mds92/MD.BootstrapPersianDateTimePicker/tree/master-bs4`
1919

2020
### Installing:
21-
First you have to install `Bootstrap 5` and link them to your html file.
21+
First you have to install `Bootstrap 5` and link it to your html file.
2222

2323
Now add these files to you html:
2424
```html
@@ -123,8 +123,8 @@ Name | Return Value | Description | Sample
123123
**setDatePersian** | void | Set selected datetime with Date object argument | dtp1Instance.setDatePersian(1400, 06, 31);
124124
**setDateRange** | void | Set selected datetime range with Date object argument | dtp1Instance.setDateRange(new Date('2021/09/04'), new Date('2021/09/22'));
125125
**clearDate** | void | clear selected date | dtp1Instance.clearDate();
126-
**convertDateToString** | string | utility method, convert date object to string | const dateStr = dtp1Instance.convertDateToString(date: new Date(), isGregorian: false, format: 'yyyy/MM/dd');
127-
**convertDateToJalali** | json | utility method, convert date object to Jalali | const jalaliObj = dtp1Instance.convertDateToJalali(new Date());
126+
**convertDateToString** | string | utility & static method, convert date object to string | const dateStr = mds.MdsPersianDateTimePicker.convertDateToString(date: new Date(), isGregorian: false, format: 'yyyy/MM/dd');
127+
**convertDateToJalali** | json | utility & static method, convert date object to Jalali | const jalaliObj = mds.MdsPersianDateTimePicker.convertDateToJalali(new Date());
128128

129129
<hr>
130130

dist/mds.bs.datetimepicker.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mds.bs.datetimepicker.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mds.bs.datetimepicker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,14 +2181,14 @@ data-bs-toggle="dropdown" aria-expanded="false">
21812181
* @param isGregorian آیا تاریخ تبدیل به شمسی شود و نمایش داده شود یا خیر
21822182
* @param format فرمت مورد نظر برای تبدیل تاریخ به رشته
21832183
*/
2184-
convertDateToString = (date: Date, isGregorian: boolean, format: string): string => {
2184+
static convertDateToString = (date: Date, isGregorian: boolean, format: string): string => {
21852185
return MdsPersianDateTimePicker.getDateTimeString(!isGregorian ? MdsPersianDateTimePicker.getDateTimeJsonPersian1(date) : MdsPersianDateTimePicker.getDateTimeJson1(date), format, isGregorian, isGregorian);
21862186
};
21872187
/**
21882188
* تبدیل آبجکت تاریخ به شمسی
21892189
* @param date آبجکت تاریخ
21902190
*/
2191-
convertDateToJalali = (date: Date): MdsPersianDateTimePickerConvertedDateModel => {
2191+
static convertDateToJalali = (date: Date): MdsPersianDateTimePickerConvertedDateModel => {
21922192
const dateTimeJson1 = MdsPersianDateTimePicker.getDateTimeJson1(date);
21932193
const jalaliJsonModel = MdsPersianDateTimePicker.toJalali(dateTimeJson1.year, dateTimeJson1.month, dateTimeJson1.day);
21942194
return {

0 commit comments

Comments
 (0)