Elasticsearch:更新索引分析器后,索引需要一个reindex吗?(Elasticsearch: After update index analyzer, index need a reindex?)
如果我更新索引分析器像同义词或关键字,我需要重新索引文档?
分析器更新后我注意到一些奇怪的搜索结果。
If i update index analyzer like synonyms or keywords, i need to reindex the documents?
I notice some strange search result after analyzer update.
原文:https://stackoverflow.com/questions/39587610
最满意答案
将日期选择器初始化调用包装在document.ready中。 这个代码在dom完成从它的外观加载之前运行。 由于JavaScript被解释,因此它在浏览器读取时运行。 因为你在头部定义了代码,所以尚未加载正文及其内容; 所以选择器没有找到初始化datepicker的元素。 如果您不想使用document.ready功能,您还可以将脚本移动到body标记的末尾。
$(function(){ $('.date_picker input').datepicker({ format: "dd.mm.yyyy", todayBtn: "linked", language: "de" }); });
Wrap the date picker initialize call in a document.ready. This code is running before the dom is finished loading from the look of it. Since JavaScript is interpreted it is run at the time it is read by the browser. Because you're defining the code in the head the body and its contents haven't been loaded yet; so the selector finds no elements to initialize datepicker. If you don't want to use document.ready functionality you could also move the script to the end of the body tag.
$(function(){ $('.date_picker input').datepicker({ format: "dd.mm.yyyy", todayBtn: "linked", language: "de" }); });
相关问答
更多-
Twitter Bootstrap目前与jQuery UI风格不兼容。 https://github.com/twitter/bootstrap/issues/156 这可能有助于您https://github.com/sferik/rails_admin(http://rails-admin-tb.herokuapp.com/admin/drafts/new ) Twitter Bootstrap is incompatible with jQuery UI styles at the moment. h ...
-
在包含bootstrap-datetimepicker.js文件之前,还需要添加moment.js 。将日期选择器初始化调用包装在document.ready中。 这个代码在dom完成从它的外观加载之前运行。 由于JavaScript被解释,因此它在浏览器读取时运行。 因为你在头部定义了代码,所以尚未加载正文及其内容; 所以选择器没有找到初始化datepicker的元素。 如果您不想使用document.ready功能,您还可以将脚本移动到body标记的末尾。 $(function(){ $('.date_picker input').datepicker({ ...你会用完全相同的方式。 切换时,NgbInputDatepicker显示一个NgbDatepicker,它从服务中获取其标签。 You would use the exact same way. The NgbInputDatepicker, when toggled, displays an NgbDatepicker, which gets its labels from a service.有必要首先通过选项将您的datepicker定义为多日期选择器。 $('#datepicker2').datepicker({ multidate: true }); 然后你可以通过setDates方法设置你的日期: $('.date').datepicker({ multidate: true }); $('.date').datepicker('setDates', [new Date(2014, 2, 5), new Date(2014, 3, 5)]) 加载的JavaScript必须有这样的东西 $.fn.datepicker.dates['XX'] = { ..... rtl: true }; 另外,您的JavaScript必须具有以下内容: $('。datepick ...
如何使用JQuery 3.3.1和Bootstrap 3.3.7设置日期选择器?(How to set date-picker with JQuery 3.3.1 and Bootstrap 3.3.7?)[2023-07-29]
您必须将datepick类从移到带有input-group类的,以让用户打开点击日历图标的选择器。 然后,您必须将只读属性添加到输入并将ignoreReadonly选项设置为true 。 使用format选项自定义日期格式并隐藏 timepicker,如文档所示: 有关有效格式,请参阅momentjs的文档 。 格式也指示显示哪些组件,例如MM/dd/YYYY将不显示时间选择器。 这里有一个实况样本: $(document).ready(function() { $('.da ...bootstrap日期和时间选择器不能在bootstrap-modal上工作?(bootstrap date and time picker not working on bootstrap-modal?)[2023-10-13]
您必须提供更多信息,因为该datepicker肯定适用于Bootrap模式。 演示 。 你在使用Bootstrap 2吗? 因为这就是建立bootstrap-datetimepicker的原因。 You'll have to provide more information, because that datepicker certainly works in Bootrap modals. Demo. Are you using Bootstrap 2? Because that's what boots ...Bootstrap 3的日期选择器正在清理另一个组件,可能是什么?(Date-picker of Bootstrap 3 is cleaning another components, what could be?)[2023-08-27]
我假设这些日期是为了搜索网格中显示的那些“成员”? 我相信,当您focus datepicker控件并保留focus它会为该input模型添加一个默认值,如1/1/1967但实际上并未显示它 - 因此重新渲染网格时未找到任何结果。 也许这会导致你朝着正确的方向前进,如果它不在基地,很抱歉。 Found the solution: $('.js-date').datepicker().on('changeDate', function(ev) { }).on('hide', function(even ...修复了您的网址。 注意我已经在结束标记