bootstrap-datetimepicker

How to allow maxDate and minDate to be equal on Bootstrap DateTimePicker?

喜欢而已 提交于 2020-01-25 06:57:49
问题 In order to create a report, I need to be able to choose the same starting and ending date. I'm able to do that, but only on the first time that I pick the maxDate. After that I can't pick the same value of the minDate as maxDate. E.g: Browser opens up. I choose 01/01/2020 as starting date (minDate). I choose 01/01/2020 as ending date (maxDate). I change ending date to 02/01/2020. Now I'm unable to pick '01/01/2020' as ending date again. I need to be able to select the same moment for minDate

$(…).datetimepicker is not a function

社会主义新天地 提交于 2020-01-10 04:56:06
问题 I use webpack and want to use bootstrap-datetimepicker. In my webpack config I use ProvidePlugin to get "jquery module". In my code I get error $(...).datetimepicker is not a function when I call $('#datetimepicker12').datetimepicker function. I don't why $ variable doesn't contain datetimepicker function, which should be defined in var datetimepicker = require('eonasdan-bootstrap-datetimepicker'); webpack.config.js var webpack = require('webpack'); var merge = require('webpack-merge'); var

modify datetimepicker dynamically with javascript

点点圈 提交于 2020-01-07 02:51:31
问题 I am initializing a datetimepicker as $(document).ready(function() { $("#meeting_datetime").datetimepicker({format: 'LLLL', stepping: 5, enabledHours: [], daysOfWeekDisabled: []}).prop('disabled', true); }); Now I would like to enable this datetimepicker and limit the possible selection dynamically depending on user input. I call this function everytime the user changes certain other selections $("#meeting_datetime").datetimepicker({defaultDate: tomorrowsDate, format: 'LLLL', enabledHours:

Using Eonasdan bootstrap-datetimepicker, need to preset year to 65 years ago

99封情书 提交于 2020-01-06 13:11:00
问题 I have an application for medical professionals servicing Medicare patients typically in their 60's to 100's and we I use Eonasdan bootstrap-datetimepicker to allow them to select birthdates like so: JavaScript: $('.birthDateTimePicker').datetimepicker({ format: 'M/D/YYYY', maxDate: (new Date()),// used to disallow future dates showClose: true, viewMode: 'years' }); HTML: <div class="input-group birthDateTimePicker"> <input id="birthDt" name="birthDt" type="text" placeholder="Birth Date"

Angular2 (Beta 11) throws exception when trying to wrap bootstrap-daterangepicker in component

不问归期 提交于 2020-01-06 03:19:19
问题 I am currently evaluating Angular2 (Beta 11). In a prototype I tried to wrap the bootstrap-daterangepicker (https://github.com/dangrossman/bootstrap-daterangepicker) in a component. However I encountered some strange problem which I cannot explain. (It seems the problem occurs only with Beta 10 and 11. I was not able to reproduce the problem with Beta 8 and 9.) Please have a look on this Plunkr: https://plnkr.co/edit/u958id The DateRangePickerComponent looks like this: import {Component,

Bootstrap date range picker view month and year only

眉间皱痕 提交于 2020-01-04 13:27:23
问题 i build a form that contain month range. i am using daterangepicker bootstrap to do it. For example from Jan to April, but i cannot display month view only using viewMode: 'months', or may be there is another code to display month only? This is my js code: $(function () { $('#growthrange').daterangepicker({ format: 'MM/yyyy', viewMode: 'months', minViewMode: 'months', autoclose: true, locale: { applyLabel: 'Apply Date', fromLabel: 'First Date', toLabel: 'Second Date', monthNames: ['January',

Bootstrap date range picker view month and year only

孤街醉人 提交于 2020-01-04 13:26:04
问题 i build a form that contain month range. i am using daterangepicker bootstrap to do it. For example from Jan to April, but i cannot display month view only using viewMode: 'months', or may be there is another code to display month only? This is my js code: $(function () { $('#growthrange').daterangepicker({ format: 'MM/yyyy', viewMode: 'months', minViewMode: 'months', autoclose: true, locale: { applyLabel: 'Apply Date', fromLabel: 'First Date', toLabel: 'Second Date', monthNames: ['January',

bootstrap-datetimepicker show date only

旧巷老猫 提交于 2020-01-04 04:10:20
问题 I am using this repo by smalot and I want to select and show date only (for some other places I am showing data and time, therefore selecting this repo). I can manage to use it for selecting date only but the generated date string is always yyyy-mm-dd hh:ii . And if I did not understand wrongly the format option is for parsing the initial date only but not setting dates. <div class="input-group date datetime dateonly" data-start-view="2" data-min-view="2" style="margin-bottom: 0;"> <input

datetimepicker component not in right place

北战南征 提交于 2020-01-03 07:01:07
问题 I want to use datetimepicker from bootstrap so I follow manual installing guides in this site bootstrap-datetimepicker but I've got following error: Uncaught Error: datetimepicker component should be placed within a relative positioned container. How to solve it? <div class="control-group form-horizontal "> <label class="control-label">Date</label> <div class="controls"> <input name="datetime" id="datetimepicker4" type="text" class="span4" value="<?php echo $datetime; ?>"> </div> </div>

How to use Bootstrap 3 Datepicker in angular 2

拥有回忆 提交于 2020-01-02 05:20:45
问题 I am using Bootstrap 3 in the angular 2. But can't find any helpful demo or examples from online docs. When I add time picker in the template as following: <div class='input-group date' id='datetimepicker3'> <input type='text' class="form-control" #datePicker [ngModel]="f.ArrivalTime" (blur)="date = datePicker.value" /> <span class="input-group-addon"> <span class="glyphicon glyphicon-time"></span> </span> <script type="text/javascript"> $(function () { $('#datetimepicker3').datetimepicker({