datetimepicker

How to disable past dates from today in bootstrap datetimepicker? [duplicate]

为君一笑 提交于 2019-12-03 14:56:50
问题 This question already has answers here : Bootstrap datetimepicker startDate does not disable past dates (3 answers) Closed 4 years ago . Unable to disable the past dates in bootstrap datetimepicker HTML <br/> <div class="row"> <div class="col-md-12"> <h6>Datetimepicker</h6> <div class="form-group"> <div class="input-group date" id="datetimepicker"> <input type="text" class="form-control" /> <span class="input-group-addon"><span class="glyphicon-calendar glyphicon"></span></span> </div> </div>

jQuery Uncaught TypeError: $(…).autocomplete is not a function

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the following files <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <link href="css/style2.css" rel="stylesheet" type="text/css" /> <link href="css/default.css" rel="stylesheet" type="text/css" /> <link href="css/index.css" rel="stylesheet"

Set default format of datetimepicker as dd-MM-yyyy

左心房为你撑大大i 提交于 2019-12-03 09:08:49
问题 I have a datetimepicker which on loading of windows form shows me format in 'MM-dd-yyyy', as follows: I would like it in dd-MM-yyyy . I tried the following: set custom format: "dd-MM-yyyy" But Its not changing. What could be the problem? Please help me. 回答1: Ensure that control Format property is properly set to use a custom format: DateTimePicker1.Format = DateTimePickerFormat.Custom Then this is how you can set your desired format: DateTimePicker1.CustomFormat = "dd-MM-yyyy" 回答2: Ammending

DateTimePicker: pick both date and time

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to use DateTimePicker (Winforms) to pick both date and time (in the dropdown)? How do you change the custom display of the picked value? Also, is it possible to enable the user to type the date/time manually? 回答1: Set the Format to Custom and then specify the format: dateTimePicker1.Format = DateTimePickerFormat.Custom; dateTimePicker1.CustomFormat = "MM/dd/yyyy hh:mm:ss"; or however you want to lay it out. You could then type in directly the date/time. If you use MMM, you'll need to use the numeric value for the month for

Bootstrap datetimepicker disable minutes

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using v4 from https://github.com/Eonasdan/bootstrap-datetimepicker . Now I am trying to disable the minutes-selector on time-selection. I know I could use: $(this).datetimepicker({ format: 'HH' }); But with this code, minutes aren't shown at all. I would like to show minutes in the selector, but disable it. Any chance to achieve that? 回答1: I tried using dp.show and dp.change events to handle it. In the show event minutes element are disabled in order to avoid minutes changing and the hour part is taken and followed by :00 . Code: $('

unable to bind event to datetimepicker plugin

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Trent Richardson's jQuery UI Timepicker. I know the plugin has been modified to override $.datepicker._selectDate so that the picker will stay open when a date is selected. That's great. However, I have been asked to have the picker close when double-clicking a date. Everything else remains the same, including a button for closing the picker when done, etc., only they want the double-click to work as well. I have attempted to bind the double-click event to calendar dates in several ways (mostly variations of $('.ui-datepicker

Bootstrap 3 datetimepicker widget position

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using bootstrap 3 diatomite picker widget, but I am unable to control its position. Right now the widget appears at the bottom of my page when I don't use horizontal and vertical options, but when I use horizontal and vertical options I get an error saying horizontal is not a valid option. These options are not working for me: horizontal: 'right', vertical: 'top' Here is my code: enter code here <input type="text" value="<fmt:formatDate value="${visitDetail.visitDate }" pattern="dd-MM-yyyy hh:mm aaa" />" name="patient.visitDetails[$

DateTimePicker time picker in 24 hour but displaying in 12hr?

回眸只為那壹抹淺笑 提交于 2019-12-03 06:40:58
问题 I'm using the bootstrap ready date time picker from http://eonasdan.github.io/bootstrap-datetimepicker/ and it's working nicely but for one issue. I have a picker setup just from time as so: $(function () { $('#startTime, #endTime').datetimepicker({ format: 'hh:mm', pickDate: false, pickSeconds: false, pick12HourFormat: false }); }); This sets the picker to 24 hour so I can select 19:00 as a time. But when I choose this time it displays as 07:00 in the input box. Here is the setup displaying

How to disable past dates from today in bootstrap datetimepicker? [duplicate]

99封情书 提交于 2019-12-03 04:39:15
This question already has answers here : Bootstrap datetimepicker startDate does not disable past dates (3 answers) Unable to disable the past dates in bootstrap datetimepicker HTML <br/> <div class="row"> <div class="col-md-12"> <h6>Datetimepicker</h6> <div class="form-group"> <div class="input-group date" id="datetimepicker"> <input type="text" class="form-control" /> <span class="input-group-addon"><span class="glyphicon-calendar glyphicon"></span></span> </div> </div> </div> </div> JavaScript $(function () { $('#datetimepicker').datetimepicker(); }); I also used startDate atrribute.But no

Remove timezone from a moment.js object

家住魔仙堡 提交于 2019-12-03 04:18:44
I'm using datetimepicker.js and its date function returns a moment.js object. It does so with the local UTC offset in it and my original date has a different offset. My original date: 2015-10-01T15:00:00.000Z What I display on the date time picker ( DD-MM HH:mm ): 01-10 15:00 What I get: 2015-10-01T15:40:00+01:00 What I want: 2015-10-01T15:40:00+00:00 Note how I removed the +01 offset at the end. How can I do this applying it for any local UTC ? This is, without having to manually remove the 01 (as it can be a any other local offset depending on the user location). var momentDate = timePicker