限制日期控件的不可编辑性,解决输入不正确日期返回异常的问题
This commit is contained in:
parent
2be1ac0dbd
commit
5b85aa0961
|
@ -1343,7 +1343,7 @@ module ApplicationHelper
|
|||
start_of_week = start_of_week.to_i % 7
|
||||
|
||||
tags = javascript_tag(
|
||||
"var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " +
|
||||
"var datepickerOptions={dateFormat: 'yy-mm-dd',EditText:false, firstDay: #{start_of_week}, " +
|
||||
"showOn: 'button', buttonImageOnly: true, buttonImage: '" +
|
||||
path_to_image('/images/calendar.png') +
|
||||
"', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};")
|
||||
|
@ -1365,7 +1365,7 @@ module ApplicationHelper
|
|||
start_of_week = start_of_week.to_i % 7
|
||||
|
||||
tags = javascript_tag(
|
||||
"var datepickerOptions={dateFormat: 'yy-mm-dd',minDate: new Date(), firstDay: #{start_of_week}, " +
|
||||
"var datepickerOptions={dateFormat: 'yy-mm-dd',minDate: new Date(),EditText:false, firstDay: #{start_of_week}, " +
|
||||
"showOn: 'button', buttonImageOnly: true, buttonImage: '" +
|
||||
path_to_image('/images/calendar.png') +
|
||||
"', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true, onClose: function(dateText, inst) {TimeClose(dateText,inst);}, beforeShow : function(input){TimeBeforeShow(input);} };")
|
||||
|
|
Loading…
Reference in New Issue