bootstrap-datetimepicker

How can I add a minimum of days based on hour in datetimepicker?

谁说胖子不能爱 提交于 2019-12-11 05:27:01
问题 My code javascript like this : $(function () { $('#datepicker').datetimepicker({ minDate: moment().startOf('day') }).on('dp.change', function(e){ if( e.date && e.date.isSame(moment(), 'd') ){ var min = moment().startOf('minute').add(300, 'm'); $('#timepicker').data("DateTimePicker").minDate(min); } else { $('#timepicker').data("DateTimePicker").minDate(false); } }); $('#timepicker').datetimepicker({ minDate: moment().startOf('minute').add(300, 'm'), }); }); Demo and full code like this :

AngularJS ui-bootstrap: Datepicker not working in month mode

半城伤御伤魂 提交于 2019-12-11 03:41:20
问题 I am unable to use AngularJS' ui-bootstrap's datepicker in the month mode. Here's a plunker. Here's my template : <html> <head> <link rel="stylesheet" href="style.css"> </head> <body ng-app="TestApp"> <div ng-controller="testController"> {{dt}} <datepicker ng-model="dt.from" datepicker-mode="mode" min-mode="mode"></datepicker> <datepicker ng-model="dt.to" datepicker-mode="mode" min-mode="mode"></datepicker> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.25/angular

Disable future dates using angular-bootstrap-datetimepicker

江枫思渺然 提交于 2019-12-11 02:43:24
问题 I'm building a website in which the user has the ability to see some charts. Those charts are date-specific so the user needs to select the date for the chart to show up. Everything is working, but the user is allowed to select future dates. This shouldn't happen, because the charts are only for present and past dates. For the project I'm using Angular5 and for the date picker angular-bootstrap-datetimepicker and I can't seem to find the way to disable those date. The way I'm using the

Bootstrap-datetimepicker - dynamically add shows up in wrong area

眉间皱痕 提交于 2019-12-11 01:17:51
问题 So after writing to the DB through ajax. my success function. builds an element and appends it to the table. Then after it appends it to the table it calls a datetimepicker on that new appended row. However the date time picker (calendar) shows up somewhere completely weird. See screen shot. One thing I should mention is that these notes are in a tab-pane it looks like Please see below for the view and the javascript VIEW: <div class="panel-body"> @if (session('status')) <div class="alert

Bootstrap datetimepicker strange positioning on a different div altogether

╄→尐↘猪︶ㄣ 提交于 2019-12-10 18:08:11
问题 I am using bootstrap datetimepicker with formatting to enable only editing time in my code, I do it like this: function setTimepicker(object){ object.datetimepicker({ format: 'HH:mm' }); } I call this function in document.ready like so: $(document).ready(function(){ setTimepicker(starttimefield); setTimepicker(endtimefield); }); The html I am using is like this: <div class="panel-body"> <form id="myform"> <p> <b>Create a New Event:</b></p> <br> <p>Description for main page: <br> <textarea id=

Change language to Bootstrap Datetimepicker

僤鯓⒐⒋嵵緔 提交于 2019-12-10 13:54:35
问题 I'm using the datetimepicker of Bootstrap, it's working pretty well. The thing is that it's in english, and I need it in spanish, I had read some post but nothing works to me. my HTML is defined as: <div class="form-group"> <div class='input-group date datepicker' data-date-startdate="{{$student->middle}}" name="datepicker" > <input type='text' class="form-control placementT" id="fecha"> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div>

Bootstrap-Datetimepicker not working with the jQuery 3

时光怂恿深爱的人放手 提交于 2019-12-10 03:31:42
问题 Bootstrap-datetimepicker is not working with jQuery 3.1.1. I need to use the same jQuery library to run all the other dependent functions. 回答1: As per the docs, the required files for bootstrap datetimepicker to run are : jQuery Moment.js Bootstrap.js Bootstrap CSS Bootstrap Datepicker CSS Locales: Moment's locale files See this fiddle and check External Resources on the left Initialize like this $('#datetimepicker1').datetimepicker(); I have used the following files : jQuery 3.1.1 moment.js

datetimepicker erasing value from input if value exists at page load

∥☆過路亽.° 提交于 2019-12-10 03:30:25
问题 I'm using this datetime picker for Bootstrap 4 https://tempusdominus.github.io/bootstrap-4/ The plugin works just fine if the input is blank at load. However, I have an Edit form that has already a value but the datepicker is removing the value at page load. <div class="container"> <div class="row"> <div class='col-sm-6'> <div class="form-group"> <input class="form-control datetimepicker-input" data-target="#Entry_EntryDate" data-toggle="datetimepicker" data-val="true" data-val-date="The

DatePicker Editor Template

空扰寡人 提交于 2019-12-09 13:40:08
问题 Below is an EditorTemplate that renders a Bootstrap datetimepicker with EditorFor helpers, the problem I am seeing is with the script section. It works OK for one DateTimePicker per view - but since I am using class selector, whenever I use 2 or more DateTimePicker s per view it renders duplicate <script> sections, confusing the DOM as to on which TextBox to invoke the calendar. What am I missing here? @model DateTime? <div class='input-group date datePicker'> <span class="input-group-sm">

How to add seconds to Bootstrap date time picker

◇◆丶佛笑我妖孽 提交于 2019-12-07 07:03:20
问题 I am using the Bootstrap datatimepicker (https://eonasdan.github.io/bootstrap-datetimepicker/). It's great but it does not show or let the user select seconds . $(document).ready(function () { $('#datetimepicker1').datetimepicker({defaultDate: new Date()}); }); <div class='input-group date' id='datetimepicker1'> <input type='text' class="form-control" /> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> So how to select seconds as well? And how