datetimepicker

BoldDays for TDateTimePicker?

百般思念 提交于 2019-11-28 10:30:53
问题 I'm using Delphi7 and I'd like to bold some days of a TDateTimePicker control. I've read that, originally, it's a descendant of TMonthCalendar , thus it should be possible. I've also found some example code, but it's in C#: http://social.msdn.microsoft.com/Forums/en/winforms/thread/03527023-694d-41ab-bffb-18c59fca1fda Please note that I don't want to use any third party DateTimePicker controls, I'd like to stay with the standard one. 回答1: You are both right and wrong :-) See: http://www

How to make the TimePicker smaller

蹲街弑〆低调 提交于 2019-11-28 08:31:37
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 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: Button setTime; setTime = (Button)findViewById(R.id.button1); setTime.setOnClickListener(this); public void

How to contol the time interval in a DateTimePicker

徘徊边缘 提交于 2019-11-28 08:15:28
问题 I have a DateTimePicker control on a form specified like so: dtpEntry.Format = DateTimePickerFormat.Custom; dtpEntry.CustomFormat = "dd/MM/yyyy hh:mm:ss"; dtpEntry.ShowUpDown = true; I would like the user to only be able to increment or decrement the time by 5 minute increments. Any suggestions on how one would accomplish this? 回答1: It's possible by watching the ValueChanged event and override the value. This sample form worked well: public partial class Form1 : Form { public Form1() {

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

▼魔方 西西 提交于 2019-11-28 05:42:44
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.parseZone("01/13/2014 3:38:00 PM -01:00").zone() // == 60 At the same time DateTimePicker http:/

How to set Datetimepicker to Month and Year only format?

你。 提交于 2019-11-28 02:49:03
问题 How can I set the Datetimepicker -Format to MM/YYYY? 回答1: Use DateTimerPicker.Format property. Check MSDN public void SetMyCustomFormat() { // Set the Format type and the CustomFormat string. dateTimePicker1.Format = DateTimePickerFormat.Custom; dateTimePicker1.CustomFormat = "MM/yyyy"; } 回答2: You can use DateTimerPicker.Format property as following: DateTimerPicker.Format = DateTimePickerFormat.Custom; DateTimerPicker.CustomFormat = "MMMM yyyy"; DateTimerPicker.ShowUpDown = true; Note:

Changing the 'Region and Language' OS setting programmatically

梦想与她 提交于 2019-11-28 02:00:31
I'd like to be able to change the Region and Language settings of the operating system (Windows 7) from a C# program. I'm not against executing command-line commands but I've only gotten as far as discovering how to launch the Region and Language dialog: control /name Microsoft.RegionAndLanguage This is a language localisation problem where Control s like DateTimePicker can only use the Windows Region and Language settings (see here for details ); however updating the operating system to conform to the application's language settings extends beyond this and is ultimately the desired goal.

DateTimePicker for WPF 4.0

旧巷老猫 提交于 2019-11-28 01:49:10
According to this post , there's a separate DatePicker control in .net 4. I've tried it, and I don't see a good way to also let it select the time of the day. Is there an easy way to transform DatePicker into DateTimePicker by editing XAML template? If not, what is the best way to get a DateTimePicker for WPF 4.0? Dean Kuga Extended WPF Toolkit sports a nice DateTimePicker with time of day. There is also an article over on CP where someone created a control that works like the Winforms one... A WPF DateTimePicker That Works Like the One in Winforms There isn't one without making it yourself or

DateTimePicker automatically move to next datepart

时间秒杀一切 提交于 2019-11-27 23:13:38
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. lc. As @Wael Dalloul says, there is no property to do what you want. After a lot of fiddling and Spy++ work, I came upon the following solution: Inheriting from System.Windows.Forms.DateTimePicker , and declaring

how to set datetimepicker with null value if date not selected(c# winforms)

依然范特西╮ 提交于 2019-11-27 20:47:44
问题 Binding b = new Binding( "Value", person, "BdayNullable", true ); dtBirthdayNullable.DataBindings.Add( b ); b.Format += new ConvertEventHandler( dtBirthdayNullable_Format ); b.Parse += new ConvertEventHandler( dtBirthdayNullable_Parse ); void dtBirthdayNullable_Format( object sender, ConvertEventArgs e ) { // e.Value is the object value, we format it to be what we want to show up in the control Binding b = sender as Binding; if ( b != null ) { DateTimePicker dtp = (b.Control as DateTimePicker

How to change culture to a DateTimepicker or calendar control in .Net

二次信任 提交于 2019-11-27 20:40:42
How to set internationalization to a DateTimepicker or Calendar WinForm control in .Net when the desire culture is different to the one installed in the PC? It doesn't seem to be possible to change the culture. See this KB article . Based on previous solution, I think the better is: dateTimePicker.Format = DateTimePickerFormat.Custom; dateTimePicker.CustomFormat = Application.CurrentCulture.DateTimeFormat.ShortDatePattern; System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("fr"); System.Threading.Thread.CurrentThread.CurrentUICulture =