Set DateTimePicker value to be null

I think the best solution is to use the build-in checkbox that tell the user if a value is specified or not. Set the control property ShowCheckBox = true When you bind the value to it do something like if (value == DateTime.MinValue) { datePicker.Checked = false; } else { datePicker.Checked = true; datePicker.Value = … Read more

Get the value of bootstrap Datetimepicker in JavaScript

Either use: $(“#datetimepicker1”).data(“datetimepicker”).getDate(); Or (from looking at the page source): $(“#datetimepicker1”).find(“input”).val(); The returned value will be a Date (for the first example above), so you need to format it yourself: var date = $(“#datetimepicker1”).data(“datetimepicker”).getDate(), formatted = date.getFullYear() + “-” + (date.getMonth() + 1) + “-” + date.getDate() + ” ” + date.getHours + “:” + … Read more

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

“Floating” is the key to the problem here. What’s never not a problem (occasionally responsible for odd things) is relying on the message pump in Excel to dispatch Windows messages, the messages that make these controls respond to input. This goes wrong in WPF as much as Winforms, they have their own dispatch loop that … Read more

DateTimePicker: pick both date and time

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 entry, unless you write some code yourself … Read more

Is there any good and free Date AND Time Picker available for Java Swing? [closed]

For a time picker you can use a JSpinner and set a JSpinner.DateEditor that only shows the time value. JSpinner timeSpinner = new JSpinner( new SpinnerDateModel() ); JSpinner.DateEditor timeEditor = new JSpinner.DateEditor(timeSpinner, “HH:mm:ss”); timeSpinner.setEditor(timeEditor); timeSpinner.setValue(new Date()); // will only show the current time

How to make a directive update ng-model on jquery on event?

This is sure thing that any plugin which has been added to angular doesn’t update the ng-model of angular scope, we need to manually do it on it’s jquery change event. In angular jquery plugin should always binded to DOM using directive, because directive does provide good control over a DOM. As you asked in … Read more