作成日: 2018/10/04 最終更新日: 2019/04/10
文書種別
不具合
状況
修正済み
詳細
C1InputDateコントロールでAutoPostBackをTrueにしDisplayFormatプロパティを設定している場合、コントロールからフォーカスが外れた際に、値を変更していなくてもポストバックが発生します。
回避方法
この問題は2019J v1(4.0.20191.301)で修正されました。
※修正版を適用しない場合の回避方法は以下の通りです。
下記のスクリプトを実装することにより回避できます。
<script>
var originvalue = null;
$(document).ready(function () {
$('#C1InputDate1').focusin(function () {
if (originvalue == null) {
originvalue = $(this).val();
}
});
$('#C1InputDate1').focusout(function () {
$(this).data('preText', originvalue);
$(this).data('changed', false);
originvalue = null;
setTimeout(function () {
$(this).data('preText', null);
}, 100);
});
});
</script>
<wijmo:C1InputDate ID="C1InputDate1" runat="server" AutoPostBack="True" DisplayFormat="D"></wijmo:C1InputDate>
※修正版を適用しない場合の回避方法は以下の通りです。
下記のスクリプトを実装することにより回避できます。
<script>
var originvalue = null;
$(document).ready(function () {
$('#C1InputDate1').focusin(function () {
if (originvalue == null) {
originvalue = $(this).val();
}
});
$('#C1InputDate1').focusout(function () {
$(this).data('preText', originvalue);
$(this).data('changed', false);
originvalue = null;
setTimeout(function () {
$(this).data('preText', null);
}, 100);
});
});
</script>
<wijmo:C1InputDate ID="C1InputDate1" runat="server" AutoPostBack="True" DisplayFormat="D"></wijmo:C1InputDate>
旧文書番号
83279