1
同じページに2つの異なるプライムカレンダーが必要です。p:年と月のみのカレンダー
年月が1つで、月と年のみのカレンダーが1つあります。
とカレンダーの下にはjavascriptとCSSを使用しています。 これはうまくいきますが、他のカレンダーにも影響があり、以下のCSSスタイルのために日付が表示されません。 特定のカレンダーにスタイルを適用する方法はありますか?
ジャバスクリプト: -
$(".monthPicker").datepicker({
dateFormat: 'M yy',
changeMonth: true,
changeYear: true,
showButtonPanel: true,
maxDate: $.now() ,
onClose: function(dateText, inst) {
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).val($.datepicker.formatDate('M yy', new Date(year,month, 1)));
}
});
$(".monthPicker").datepicker("option", "maxDate", new Date());
$(".monthPicker").focus(function() {
$(".ui-datepicker-calendar").hide();
$("#ui-datepicker-div").position({
my: "center top",
at: "center bottom",
of: $(this)
});
});
CSS: -
.ui-datepicker-calendar {
display: none;
}
を私は... – Kukeltje
pは、この問題の任意のPrimeFacesが表示されない:カレンダーは... primefacesカレンダーです@Kukeltje – Harshal
しかし、NO pはありません。カレンダーに上記のあなたのコード。あなたは '' $( "。monthPicker")を使ってやっているので、プレーンなジェットカレンダーを使っているだけかもしれません。datepicker(...) ' – Kukeltje