嗨,我正在使用pickdate,我在我看来有这个字段:
<%= f.text_field :date_of_birth,:placeholder =>'Select Date',
:class => 'datepicker picker_input' %>
Run Code Online (Sandbox Code Playgroud)
所以在这里我有这个jquery
$('.datepicker').pickadate({
format: 'dd/mm/yyyy',
selectMonths: true,
selectYears: 60
});
Run Code Online (Sandbox Code Playgroud)
所以它给了我1985年到2045年的年份,但我想要从1945年到现在的年.如何在pickadate的帮助下获取此信息.请指导我.提前致谢.
嗨,我需要验证+1-541-754-3010 , (123) 986-5470 and 123-569-8740以下正则表达式后给出的这些格式的电话号码
validates :phone, format: { with: /\A\(?\d{3}\)?[- ]?\d{3}[- ]?\d{4}\z/,
message: I18n.t('global.errors.phone_format')}
Run Code Online (Sandbox Code Playgroud)
它适用于(123)986-5470和123-569-8740但不适用于
+1-541-754-3010
754-3010 Local
(541) 754-3010 Domestic
+1-541-754-3010 International
1-541-754-3010 Dialed in the US
001-541-754-3010 Dialed from Germany
191 541 754 3010 Dialed from France
Run Code Online (Sandbox Code Playgroud)
请指导我如何解决这个问题.谢谢
嗨,我的要求是显示加载微调器,并且在为此发送ajax请求时,页面会禁用并且不可点击,我已经提供了给定的代码
$('#expressShippingCalculation input').change ->
if $('#shipping_method4').is(':checked')
additionalAmountExpress()
data = $('#shippingDetails').serialize()
expressValue = true
else
$('#additional-charge').hide()
expressValue = false
$.ajax
url: '/update_express_shipping?expressShipping=' +expressValue
type: 'PATCH'
return
$(document).ajaxStart ->
$('#spinner').show()
return
$(document).ajaxComplete ->
$('#spinner').hide()
return
$(document).ajaxError ->
$('#spinner').hide()
return
Run Code Online (Sandbox Code Playgroud)
上面的代码片段ajax loader可以正常工作,但是在微调器加载时我的页面没有被禁用。请指导我如何在加载Ajax时禁用页面。