bootstrap-datepicker

Set startDate on dynamic datepicker

喜夏-厌秋 提交于 2019-12-25 04:49:19
问题 I have dynamically created html table using jquery which contains 3rows with input textboxes.The fields of the table are SlNo Fee ST TotalAmt DueDate On the first row startDate of DueDate should be the current date. On the second row startDate of DueDate should be previously(date of first row) selected date. On the third row startDate of DueDate should be previously(date of second row) selected date Jquery for dynamically created table var $tbody = $("#tblPaymentDetails tbody"); $($tbody)

bootstrap-datepicker bound to vue v-model reverts to previous data when losing focus

邮差的信 提交于 2019-12-25 03:37:19
问题 I have a form where a datepicker follows a text input. After the text input has been given, the datepicker receives a date from an ajax call. The focus is now on the datepicker, which shows (as expected) the received date. When the user tabs to the next input, the datepicker reverts to its previous data, which ends up being the placeholder in most cases. The vue app code: var app = new Vue({ el: "#app", data: { theDate: '', aNumber: 0, bNumber: 0 }, mounted() { $("#aDate").datepicker({ format

Can't make datepicker bootstrap to work

泄露秘密 提交于 2019-12-25 02:26:28
问题 I copy and paste the first example from this website http://eonasdan.github.io/bootstrap-datetimepicker/ to my own html codes. When I click on the picture beside the textbox, it doesn't pop up the calendar for me to choose <!DOCTYPE html> <html lang="en"> <head> <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet"> </head> <div class="container"> <div class="row"> <div class='col-sm-6'> <div class="form-group"> <div class='input-group date' id='datetimepicker1'> <input type='text'

prevent show event from firing when on datepicker

时光总嘲笑我的痴心妄想 提交于 2019-12-24 21:48:35
问题 I have a bootstrap datepicker. I want the show event to be fired when the input box is first clicked. However I don't want the event to be fired if the user is traversing through the months with the prev and next arrows. Is this possible? $('#sandbox-container input').datepicker({ autoclose: true }); $('#sandbox-container input').on('show', function(e){ console.log('show event'); }); If you run the fiddle you will see the message get logged when you first click the input field (I want that

Template.subscriptionsReady disables onRendered functionality

牧云@^-^@ 提交于 2019-12-24 16:26:10
问题 I am initializing datepickers and form validation in Template.templatename.OnRendered. $('#dateAccepted').datepicker({ endDate: new Date(), todayBtn: true, todayHighlight: true, autoclose: true }); I am doing subscriptions, collection queries etc in Template.templatename.onCreated. Template.insertContract.onCreated(function () { var self = this; self.autorun(function() { self.subscribe('getContracts'); self.subscribe('getSuppliers' ,function(){ var suppliers = Supplier.find({}).fetch(); var

Show all months in bootstrap datepicker

泄露秘密 提交于 2019-12-24 15:00:26
问题 I am new to bootstrap. I Want to show full Year calendar(inline) in bootstrap like this (JqueryUI) I have tried this as : <div id="datetimepicker12"></div> JS: <script type="text/javascript"> $(function () { $('#datetimepicker12').datepicker({ }); }); But this will show only one month as expected. How can I Show full year calendar in bootstrap? I am using Bootstrap v3.1.1 来源: https://stackoverflow.com/questions/36663169/show-all-months-in-bootstrap-datepicker

bootstrap-timepicker not working

会有一股神秘感。 提交于 2019-12-24 08:28:06
问题 I am trying to get timepicker to work similarly to datepicker: <div class="form-group"> <div class="input-group date" data-provide="datepicker"> <input type="text" class="form-control" placeholder="Date *" id="caldate" required data-validation-required-message="Please choose date."> <span class="input-group-addon"> <i class="glyphicon glyphicon-th"></i> </span> <p class="help-block text-danger"></p> </div> </div> <script> var date = new Date(); date.setDate(date.getDate()+1); $('div.input

minDate and maxDate options are not working in datepicker

风流意气都作罢 提交于 2019-12-24 02:25:34
问题 I'm using the "datepicker" plugin on my project, it's set to decade view, and I want to disable the future dates, for this I have used the maxDate option but it's not working, my code: $('#data_1 .input-group.date').datepicker({ todayBtn: "linked", maxDate: "0", keyboardNavigation: false, forceParse: false, calendarWeeks: true, autoclose: true }); tried with 0 and new Date 回答1: Note that bootstrap-datepicker has no maxDate option, you have to use endDate. Here a working sample: $("#datepicker

Javascript added HTML value is removed when datepicker is selected

帅比萌擦擦* 提交于 2019-12-23 07:26:39
问题 I have a Bootstrap modal where you can select a date. In the background, hidden fields are populated that are also submitted with the form. The issue is that when you select the datepicker element, it removes the hidden value for some strange reason (but only the hidden values populated by the Javascript). Datepicker JS: var date = new Date(); date.setDate(date.getDate()); $('#datepicker').datepicker({ format: "dd/mm/yyyy", startDate: date, autoclose: true, }); Hidden field Populating JS: $

bootstrap-datepicker 与bootstrapValidator同时使用时,选择日期后,无法正常触发校验

吃可爱长大的小学妹 提交于 2019-12-22 21:32:17
bootstrap-datepicker 与bootstrapValidator同时使用时,选择日期后,无法正常触发校验 (解决办法) http://blog.csdn.net/biedazhangshu/article/details/51657292 (博客网址) 问题描述: bootstrapValidator插件默认情况下,不会重复校验一个已经标记为验证通过或验证不通过的字段。so ,当开始触发校验后,没有通过校验,当正确选择日期后,并不会刷新校验结果,就会导致数据无法正常提交 问题解决: 根据应用场景分析,当日期选择插件关闭时,期望能够触发校验。所以使用bootstrap-datepicker的hide方法。当日期选择框关闭时,执行刷新校验。 代码如下: js: /* 加载时间选择插件 */ $("#f_workr_remind_date").datepicker({ todayBtn : "linked", autoclose : true, todayHighlight : true, endDate : new Date() }).on('hide',function(e) { //当日期选择框关闭时,执行刷新校验 $('#project_form').data('bootstrapValidator').updateStatus('f_workr_remind