bootstrap-datetimepicker

How to import 'bootstrap-datetimepicker' into Aurelia project

落花浮王杯 提交于 2019-12-13 04:27:16
问题 I'm trying to add 'Eonasdan/bootstrap-datetimepicker' into an Aurelia with typescript project and call this.birthDateDatePicker.datetimepicker(); in the "attached" method from the Aurelia life-cycle. I added: import $ from 'jquery'; import {datepicker} from 'Eonasdan/bootstrap-datetimepicker'; and there was no error, but when I try to inject like this @inject(HttpClient, json, datepicker) I get the following error: GET http://127.0.0.1:8080/jquery.js 404 (Not Found) I'm not sure the two

How to stop datetimepicker setting todays date in textbox by default onclick

余生长醉 提交于 2019-12-12 12:49:20
问题 When we select calendar icon, it automatically sets today's date to textbox. Is there any parameter/option in the datetimepicker() function which can be set to false or null preventing datetimepicker() setting today date to textbox by default. If someone doesn't select any date from calendar the textbox should be empty rather than having today's date set by datetimepicker(). 回答1: Worth reading the docs. Change the useCurrent attribute when initailizing the datetimepicker. https://eonasdan

Bootstrap 3 Datepicker in Angular 2+ with or without jquery

£可爱£侵袭症+ 提交于 2019-12-12 10:05:03
问题 I am new to Angular 2+. I am trying to integrate Bootstrap 3 Datepicker in AngularJS2. I used the [solution]: How to use Bootstrap 3 Datepicker in angular 2. But got error like Cannot find name '$' Is there any way to implement the task with or without jquery? My code given below. index.html <script src="//code.jquery.com/jquery-1.12.0.min.js"></script> <script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" integrity=

Format date on bootstrap datetimepicker

你。 提交于 2019-12-12 03:59:11
问题 I am using the Bootstrap 3 Date/Time Picker (https://github.com/Eonasdan/bootstrap-datetimepicker) and I have problems formatting the date <input type="text" id="fmEndDate" class="form-control input-sm" datetimepicker format="DD-MM-YYYY hh:mm" ng-model="workRequest.EndDate" placeholder="..." name="fmEndDate" required ng-disabled="isDisabled"> But the value is being display as MM/DD/YYYY hh:mm AM i want 31-12-2017 23:59 for new year eve timestamp This is my directive "use strict"; angular

asp.net mvc - Set locale / format of a DateTime parameter

风流意气都作罢 提交于 2019-12-12 03:25:54
问题 I am using the bootrap datetime picker to allow the user to enter a date, show below: <div class="form-group"> <label for="end">Start date:</label><br /> <div class='input-group date' id='dt1'> @Html.TextBox("StartDateFilter", null, new { @class = "form-control" }) <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> <script type="text/javascript"> $('#dt1').datetimepicker({ format: 'L', locale: 'en-GB' }); </script> This date then gets

Set minDate for Bootstrap DateTimePicker from another

▼魔方 西西 提交于 2019-12-11 13:25:22
问题 Currently, I'm using Bootstrap 3 Datepicker from this source I have 2 datetimepicker on my system. ( startTime , endTime ). I tried but don't know how to set minDate for endTime from startTime value whenever startTime value changed. Even it don't jump on change event. Please point me what am I missing. Here is my code Many thanks. 回答1: You need to use the change event and minDate() function like $('#txtStartTime').datetimepicker({ showTodayButton: true, format: 'MM/DD/YYYY HH:mm', sideBySide:

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

Bootstrap datetimepicker installation/configuration

浪子不回头ぞ 提交于 2019-12-11 12:19:28
问题 I'm having some issues with a basic configuration of the eonasdan bootstrap datetimepicker. I created a fiddle using the code from their basic setup instructions to show my configuration. I see another Stackoverflow question on this topic that has another fiddle with older versions of the same plugins. The two fiddles look similar, but mine doesn't work. <div class="container"> <div class="row"> <div class='col-sm-6'> <div class="form-group"> <div class='input-group date' id='datetimepicker1'

Bootstrap Datetimepicker not functioning

…衆ロ難τιáo~ 提交于 2019-12-11 12:14:10
问题 I am experimenting with the excellent Bootstrap DateTimePicker plugin but appear to have hit the buffers right at the start. The page control appears correctly but the calendar button is entirely unresponsive - no picker actually pops up. I have created this fiddle to illustrate the problem. Examining the console output for the fiddle does not reveal anything obviously wrong. I noticed that the sample code uses jQuery 1.8.3 so I tried dropping back to that but to no avail. I suspect that I am

disable all previous dates in angular bootstrap datetimepicker

混江龙づ霸主 提交于 2019-12-11 11:32:53
问题 I am creating a project using angularjs. I am integrated the angulardatetimepicker from the link: https://github.com/dalelotts/angular-bootstrap-datetimepicker. Now I want to disable all previous dates from current date. Here is my code: function beforeRender($view, $dates, $leftDate, $upDate, $rightDate) { var minDate = moment().startOf($view).valueOf(); for(var i=1; i < $dates.length;i++) { if(new Date().getTime() > $dates[i].utcDateValue) { $dates[i].selectable = false; } } } This code not