datetimepicker

Set DateTimePicker value to be null

荒凉一梦 提交于 2019-12-17 11:54:07
问题 I am developing a WinForms UI with two DateTimePicker controls. Initially I want to set the value of the controls to null until a user selects a date. If the user does not select a date, it will pass a value of null to the database. By default it takes the current date. Could you plz suggest something or attach a piece of code which will help me out. I have tried setting the MinDate property but it doesn't work. The code is in C# .Net. Thanks, Manali. 回答1: I think the best solution is to use

BUG: Can't choose dates on a DatePicker that fall outside a floating VSTO Add-In

a 夏天 提交于 2019-12-17 06:51:33
问题 I logged the issue with Microsoft here - the Repro is available for download: https://connect.microsoft.com/VisualStudio/feedback/details/741454/value-change-event-doesnt-fire-for-datetimepicker-controls-used-in-vsto-add-ins If you put a DateTimePicker in a Excel VSTO floating Add-In and position it so when the calendar drops down, it is outside the edge of the add-in, see here: Choosing any of the dates circled in the green works as expected, but when clicking any dates circled in red, it

BUG: Can't choose dates on a DatePicker that fall outside a floating VSTO Add-In

隐身守侯 提交于 2019-12-17 06:51:17
问题 I logged the issue with Microsoft here - the Repro is available for download: https://connect.microsoft.com/VisualStudio/feedback/details/741454/value-change-event-doesnt-fire-for-datetimepicker-controls-used-in-vsto-add-ins If you put a DateTimePicker in a Excel VSTO floating Add-In and position it so when the calendar drops down, it is outside the edge of the add-in, see here: Choosing any of the dates circled in the green works as expected, but when clicking any dates circled in red, it

Bootstrap~日期控制

你离开我真会死。 提交于 2019-12-16 17:18:05
回到目录 一个成熟的框架,日期控制是少不了的,在网上也有很多日期控制可以选择,而主框架用了bootstrap,日期控制也当前要用它自己的, 控件地址:http://www.bootcss.com/p/bootstrap-datetimepicker/index.htm GitHub上开源地址:https://github.com/smalot/bootstrap-datetimepicker 在使用datetimepicker之前,先要经过以下几个步骤 1 引用JS脚本库 <script src="/Content/bootstraps/js/bootstrap.js"></script> <script src="/Content/bootstraps/js/bootstrap-datetimepicker.js"></script> <script src="/Content/bootstraps/js/bootstrap-datetimepicker.zh-CN.js"></script> 其中 bootstrap-datetimepicker .zh-CN.js表示可以使用中文的语言显示日期时间 2 引入CSS类库 <link href="/Content/bootstraps/css/bootstrap.css" rel="stylesheet"/> <link href

【Bootstrap】bootstrap-datetimepicker日期时间插件

风流意气都作罢 提交于 2019-12-16 15:56:41
【bootstrap-datetimepicker】   datetimepicker是一个比较方便的日期时间插件。有了这个之后,我们可以在类似于表单的地方提供一个友好的日期(时间)输入功能。官方文档:【http://www.bootcss.com/p/bootstrap-datetimepicker/】   要使用datetimepicker组件,首先引入一些文件: <link href="{% static 'bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css' %}" rel="stylesheet"> <script src="{% static 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js' %}"></script> <script src="{% static 'bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js' %}"></script>   同样这里没有写出来bootstrap的css和js以及jquery,但都是也要包含的。   ■  典型应用:   HTML写成这样: <div class="input-group date"

Bootstrap datetimepicker disable minutes

ぐ巨炮叔叔 提交于 2019-12-14 00:33:27
问题 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

How to disable date before today in datetimepicker bootstrap?

狂风中的少年 提交于 2019-12-13 22:05:00
问题 Demo and full code is like this : http://fiddle.jshell.net/oscar11/dgb09c5c/5/ My Javascript code is like this : $('#time-start').datetimepicker({ format: 'yyyy-mm-dd hh:ii:ss', autoclose: true, pickerPosition: "bottom-left", maxView: 3, minuteStep: 1, minDate: new Date() }) How to disable date before today? I add minDate: new Date() , but it's not working Any solution to solve my problem? 回答1: From Bootstrap datetime picker documentation $.fn.datetimepicker.defaults = { maskInput: true, //

jQuery datetimepicker formatting in rails 3.2

筅森魡賤 提交于 2019-12-13 20:02:25
问题 I'm using the following datetimepicker which from my understanding is the jquery-ui datepicker that has been extended. http://trentrichardson.com/examples/timepicker/ My issue is I want to display to the user am and pm times, but I want to format it differently so that when I submit it to a mysql database, the time format enters the standard "YY-mm-dd - hh:mm:ss" format. This is the format that it currently inputs 回答1: jQuery UI date pickers support passing altField and altFormat options to

How to set a starting date in Jquery datetimepicker taken from a query using coldfusion?

限于喜欢 提交于 2019-12-13 19:27:18
问题 I need to set a starting date in datetimepicker. how can i do that ? I checked with minDate and StartDate. But i couldn't able to set the starting date. Please give me a propper solution for this. Thanks in advance. Sample Code : StartDate = new Date("March 20, 2014"); jQuery('.datetimepicker').datetimepicker({step:30}); jQuery('.datetimepicker_notime').datetimepicker({ timepicker:false, format:'m/d/Y', minDate : StartDate, step:30 }); 回答1: According to the docs for this jQuery plugin (if

Can I change the label of the “set” button in a TimePickerDialog?

霸气de小男生 提交于 2019-12-13 15:31:37
问题 By default you have "set" and "cancel", I would like to change the "set" label to "Find". Is it possible? 回答1: Try yourTimePickerDialog.setButton(BUTTON_POSITIVE, "Find", yourTimePickerDialog); 回答2: TimePickerDialog tp = new TimePickerDialog(this, mTimeSetListener, 0, 0, false); tp.setButton(DialogInterface.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { if (which == DialogInterface.BUTTON_POSITIVE) { } } }); tp.setButton