eonasdan-datetimepicker

Datetime picker inherits style from my table

孤街醉人 提交于 2019-12-13 08:10:44
问题 I'm using the datepicker from eonasdan (https://github.com/Eonasdan/bootstrap-datetimepicker) It works great, but when I put it inside a table, it inherits the style of the table. It is as if the datepicker also becomes a table. How can I avoid this? I have the following in my CSS: table.table { tr { th { color: #ff0000; //red } } } This is my html file: <table class="table"> <tr> <th>Reconcile Date</th> </tr> <tr> <td> <div class="pickdate"> <input type="text" placeholder="Reconcile Date"

DataTables with eonasdan DatePicker doesn't work

我怕爱的太早我们不能终老 提交于 2019-12-13 07:05:29
问题 I have trouble with eonasdan DatePicker, i don't understand what i messed up... I think I have verified to have all the necessary resources but when i click in calendar icon nothing happens :\ Live code : live example I have followed the installation instructions and manual and demos. Quoting: Minimal Requirements jQuery Moment.js Bootstrap.js (transition and collapse are required if you're not using the full Bootstrap) Bootstrap Datepicker script Bootstrap CSS Bootstrap Datepicker CSS

catch value on event emit from child component in parent component

…衆ロ難τιáo~ 提交于 2019-12-13 01:54:05
问题 I have a component vue-datetimepicker that has the following : export default { name: 'vue-datetimepicker', data () { return { value: '' } }, watch: { options: function (options) { // update options $(this.$el).datetimepicker({ data: options }) } }, mounted: function () { var vm = this var mycomp = $(this.$el).datetimepicker({}) mycomp.on('dp.change', function (e) { vm.value = e.date vm.$emit('change', vm.value) }) }, destroyed: function () { $(this.$el).off().datetimepicker('destroy') } }

Enable only first and third wednesday for each month in Bootstrap Datepicker

ε祈祈猫儿з 提交于 2019-12-13 00:19:19
问题 Using the Bootstrap Datepicker, I'm trying to enable users to choose only first and third Wednesdays of each month. For now, the only thing I've managed to do is to enable only Wednesdays, by passing it in the options. Does anyone know if I can pass my "first and third" wanted configuration as an option, and how? <script type="text/javascript"> $(function () { $('.bootstrap-date-picker').datetimepicker({ locale: 'fr', daysOfWeekDisabled: [0,1,2,4,5,6], format: "ll", minDate: moment(), icons:

Why timepicker can not be downgraded when choosing a date other than today?

六月ゝ 毕业季﹏ 提交于 2019-12-12 04:15:46
问题 My html code like this : <div class="container"> <div class="row"> <div class='col-sm-6'> <div class="form-group"> <input type='text' class="form-control" id='datepicker' data-date-format="DD-MM-YYYY" /> </div> </div> <div class='col-sm-6'> <div class="form-group"> <input type='text' class="form-control" id='timepicker' data-date-format="HH:mm" /> </div> </div> </div> </div> <button id="btnSubmit"> Submit </button> My JavaScript code like this: $(function () { $('#datepicker').datetimepicker(

Style weeks using the Bootstrap Datepicker

烈酒焚心 提交于 2019-12-12 03:57:50
问题 I'm using the bootstrap datepicker and suppose I wish to apply styles to the calendar that appear when the calendar opens: Highlight 3/1/17 3/7/17 red Highlight 3/9/17 3/17/17 blue How can I use CSS to do this? Is there a feature in the API that allows for this? 回答1: There is no direct API for this feature, but you can use option debug: true to inspect component HTML. One way to target a specific day is using a CSS selector based on data-day attribute value, for example: [data-day="03/01/2017

eonasdan Bootstrap datetimepicker invalid date conversion

寵の児 提交于 2019-12-12 02:34:15
问题 I have a DateTimePicker Bootstrap that has a fixed format. $('.datetimepicker1').datetimepicker({ format: 'ddd, DD MMM YYYY' }); Everything works fine but when I try to paste a date on it with a different format, it converts it to a wrong date. The date I pasted is 01/02/2016 and the result I get from the datetimepicker is Tue, 01 Jan 0002 when I hit tab. It converts it to the date format I set but the date is wrong. I tried converting it onchange but I know there should be a cleaner and

Attaching eonasdan-datetimepicker to dynamically created element returns “relative positioned container” error

匆匆过客 提交于 2019-12-11 12:55:46
问题 I have the following input, which I'm attaching datetimepicker to on pageload: This works as expected. When the user clicks a button, I duplicate this input to allow for multiple dates. Clone code: The cloning works as expected, but clicking the date input triggers this error: Uncaught Error: datetimepicker component should be placed within a relative positioned container .input-group already has "position: relative;" set in a separate CSS file. I tried adding this as an inline style, but id

Eonasdan/bootstrap-datetimepicker datetime picker reset through external javascript call

筅森魡賤 提交于 2019-12-11 05:38:02
问题 I have use Eonasdan/bootstrap-datetimepicker version : 4.17.47 , now explain scenario when I open bootstrap-datetimepicker from text box & selected date after that I have one clear button onclick I have clear that value, but when I am going back to open datetimepicker its shows previously selected date as highlighted . So issue is datetimepicker is not reset, I want to reset that datetime picker on cancel click external JavaScript call. I have use below but non of them is working $('

bootstrap datetimepicker - set maxDate relative to now?

本小妞迷上赌 提交于 2019-12-10 20:39:15
问题 I use this datetimepicker: http://eonasdan.github.io/bootstrap-datetimepicker/Options/ Basically I want to set maxDate: moment() , i.e maxDate should be limited to now. The problem is by the time the datepicker is opened maxDate is not now() anymore. I want to set it maxDate to now everytime the datepicker is shown. I want to enforce it globally if possible, not to specify it on every datetimepicker() instance. Is it possible to somehow give a relative date to now using moment.js ? See this