datetimepicker

bootstrap-datetimepicker的中文显示问题

余生颓废 提交于 2019-11-27 08:26:03
  bootstrap-datetimepicker的本地化显示依赖于moment插件。也就是说moment插件提供了多语言的内容支持,而bootstrap-datetimepicker没有语言内容。   为此,如果需要支持简体中文的显示,就需要加载中文的资源文件。   在 moment 的官网,下载moment+locales.js,查找到’zh-CN’部分,另存为js文件,在moment.js和bootstrap-datetimepicker.js之间加载即可! <script src="assets/thirdparty/bootstrap-datetimepicker/js/moment.js"></script> <script src="assets/thirdparty/bootstrap-datetimepicker/js/moment_zh-CN.js"></script> <script src="assets/thirdparty/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>    来源: http://www.cnblogs.com/javawer/p/4169837.html

jquery datetimepicker

半世苍凉 提交于 2019-11-27 08:25:47
1.详细说明见:https://xdsoft.net/jqplugins/datetimepicker/ 语言选择中文,现在lang配置已经失效;可用: $.datetimepicker.setLocale('ch'); <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" href="jquery.datetimepicker.css"/ > <script src="jquery.js"></script> <script src="build/jquery.datetimepicker.full.min.js"></script> </head> <body> <input id="datetimepicker1" type="text" > </body> <script> $.datetimepicker.setLocale('zh'); jQuery('#datetimepicker1').datetimepicker({ format:'Y-m-d H:i', onClose: function(dateText, inst) {

Limiting the dates within a C# win form DateTimePicker

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 08:07:40
问题 Is it possible to limit which dates a user can select from a dateTimePicker on a C# winforms application? The basic principle for me is this: I have a comboBox with 5 items in it, based on which item the user selects I would like to limit which dates the user can then select from, having the unavailable dates grayed out. Is this possible? 回答1: Use the MinDate and MaxDate properties. dateTimePicker.MinDate = DateTime.Now; dateTimePicker.MaxDate = DateTime.Now.AddDays(15); (render on a french

How do I disable some dates on a DateTimePicker control?

回眸只為那壹抹淺笑 提交于 2019-11-27 05:18:50
I was wondering is it possible to disable selected dates in a DateTimePicker, so that user cannot select them. i know its possible in web forms but in windows forms im unable to do this.how can i achieve this. Developer Express controls are usually very flexible and judging from this support article you can achieve what you want to do with their DateEdit control. The control collection can be obtained from the following location: Over 60 Free Controls from DevExpress . (the free offer is no longer available) Don't forget to read the EULA. The ease with which you can do this will depend on the

DateTimePicker automatically move to next datepart

守給你的承諾、 提交于 2019-11-27 04:38:47
问题 Currently, when using the datetimepicker, after you enter the month you have to either hit the right arrow or the "/" for it to move to the day. Is there a property that I can set or a way to know that the month is done and move to the day and move to the year after the user is done with the day? This is the same behavior with applications written in the old FoxPro/Clipper days. 回答1: As @Wael Dalloul says, there is no property to do what you want. After a lot of fiddling and Spy++ work, I

How can I make a DateTimePicker display an empty string?

旧街凉风 提交于 2019-11-27 03:47:22
I would like to be able to display a DateTimePicker that has a default value of nothing, i.e. no date. For example, I have a start date dtTaskStart and an end date dtTaskEnd for a task, but the end date is not known, and not populated initially. I have specified a custom format of yyyy-MM-dd for both controls. Setting the value to null , or an empty string at runtime causes an error, so how can I accomplish this? I have considered using a checkbox to control the enabling of this field, but there is still the issue of displaying an initial value.. Edit: Arguably a duplicate of the question

How to make the TimePicker smaller

…衆ロ難τιáo~ 提交于 2019-11-27 02:17:24
问题 Is it possible to make the default TimePicker smaller in the activity xml? I have searched this but so far only found out how to create a custom time picker which I do not want to do, or create a popup window which I also don't want to have to do. Has anyone tried this with any success? My TimePicker is sitting in a tableRow in a scrollView. Cheers 回答1: You cannot change the size of TimePicker, how ever you can do one thing. You can make TimePicker as a Dialog. Checkout the following code:

BUG: Cant choose dates on a DatePicker that fall outside a floating VSTO Add-In

落花浮王杯 提交于 2019-11-27 02:05:53
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 just closes the calendar drop down and doesn't set the date! Does anyone know how I can fix this? EDIT This

Why does JavaScript Date.getTimezoneOffset() consider “-05:00” as a positive offset?

泪湿孤枕 提交于 2019-11-27 01:00:39
问题 I noticed that for us on Eastern Time zone ("America/New_York") with timezone offset of "-05:00" Date.getTimezoneOffset() returns a positive number of 300. I would expect offset in minutes to be negative in areas to the West from Utc, and to be positive in areas to the east of Utc, but apparently it's "flippded". What's the reasoning behind that decision? http://momentjs.com/ follows the same rule and returns... moment.parseZone("01/13/2014 3:38:00 PM +01:00").zone() // == -60 moment

Bootstrap 3 Datetimepicker 3.0.0 - make a week start on Monday

霸气de小男生 提交于 2019-11-26 23:28:10
问题 There are few reasons I use Bootstrap 3 Datetimepicker 3.0.0 in my MVC 5 project. Any idea how to offset week start so it starts from Monday? Language tag also not working. $(function () { $('#PickupTime').datetimepicker({ weekStart: 1 }); }); This is not working because it is not the same bootstrap-datapicker.js 回答1: If you are using moment.js from v2.8.1 onwards, add the below code before calling datetimepicker(). moment.updateLocale('en', { week: { dow: 1 } // Monday is the first day of