質問編集履歴
2
補足
title
CHANGED
File without changes
|
body
CHANGED
@@ -21,4 +21,49 @@
|
|
21
21
|
datepicker.jsの_renderTypesのあたりでカレンダーの選択日付が変化していた様だったのでselectDateを_renderTypesにしたり_getYearsHtmlにしてみたりしたのですがエラー(Uncaught TypeError)になりできませんでした。
|
22
22
|
|
23
23
|
西暦入力時もカレンダー表示連動させるにはどうしたらいいのでしょうか?
|
24
|
-
お手数ですがどなたかお分かりになる方、ご教授頂けますと助かります。
|
24
|
+
お手数ですがどなたかお分かりになる方、ご教授頂けますと助かります。
|
25
|
+
|
26
|
+
補足
|
27
|
+
Air Datepicker
|
28
|
+
https://github.com/t1m0n/air-datepicker
|
29
|
+
|
30
|
+
見ているファイル
|
31
|
+
datepicker.js
|
32
|
+
|
33
|
+
見ている箇所
|
34
|
+
```jQuery
|
35
|
+
//447行目〜
|
36
|
+
selectDate: function (date) {
|
37
|
+
var _this = this,
|
38
|
+
opts = _this.opts,
|
39
|
+
d = _this.parsedDate,
|
40
|
+
selectedDates = _this.selectedDates,
|
41
|
+
len = selectedDates.length,
|
42
|
+
newDate = '';
|
43
|
+
|
44
|
+
if (Array.isArray(date)) {
|
45
|
+
date.forEach(function (d) {
|
46
|
+
_this.selectDate(d)
|
47
|
+
});
|
48
|
+
return;
|
49
|
+
}
|
50
|
+
|
51
|
+
//1721行目〜
|
52
|
+
_renderTypes: {
|
53
|
+
days: function () {
|
54
|
+
var dayNames = this._getDayNamesHtml(this.d.loc.firstDay),
|
55
|
+
days = this._getDaysHtml(this.d.currentDate);
|
56
|
+
|
57
|
+
this.$cells.html(days);
|
58
|
+
this.$names.html(dayNames)
|
59
|
+
},
|
60
|
+
months: function () {
|
61
|
+
var html = this._getMonthsHtml(this.d.currentDate);
|
62
|
+
this.$cells.html(html)
|
63
|
+
},
|
64
|
+
years: function () {
|
65
|
+
var html = this._getYearsHtml(this.d.currentDate);
|
66
|
+
this.$cells.html(html)
|
67
|
+
}
|
68
|
+
},
|
69
|
+
```
|
1
説明文修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
<input id="test" data-name="day">
|
14
14
|
```
|
15
15
|
|
16
|
-
```
|
16
|
+
```jQuery
|
17
17
|
var textarea = $('#test').val();
|
18
18
|
$('input').data('name').selectDate(moment(textarea).toDate());
|
19
19
|
```
|