datetimepicker

How do I disable some dates on a DateTimePicker control?

久未见 提交于 2019-11-26 11:32:25
问题 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. 回答1: 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

Get the value of bootstrap Datetimepicker in JavaScript

笑着哭i 提交于 2019-11-26 11:06:49
问题 I need to get the value of Datetimepicker in my JavaScript function. I have made something like this, but it doesn\'t work: $(\"#date\").click( function(){ alert(document.getElementById(\'datetimepicker1\').value); }); It gives me \'undefined\' 回答1: 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

How can I make a DateTimePicker display an empty string?

心不动则不痛 提交于 2019-11-26 10:56:55
问题 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

jquery datetime picker set minDate dynamic

99封情书 提交于 2019-11-26 08:32:02
问题 I guys i\'m using a datetimepicker by trentrichardson.com. I have a form with two input fields : from and to and i want to be able to set dynamically a minDate to my \"to\" field equal to the value of my \"from\" field. I know i should use a beforShow option but don\'t know how to implement the function. $(\'.from,.to\').datetimepicker({ beforeShow: customRange }); EDITED/SOLUTION function customRange(input) { if (input.id == \'to\') { var x=$(\'#from\').datepicker(\"getDate\"); $( \".to\" )

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

时光毁灭记忆、已成空白 提交于 2019-11-26 07:28:40
问题 Is there any good and free Date AND Time Picker available for Java Swing? There are a lot date pickers available but no date AND time picker. This is the closest I came across so far: Looking for a date AND time picker Anybody? 回答1: 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

Jquery Datepicker Chrome

人盡茶涼 提交于 2019-11-26 06:35:44
问题 When using jQuery UI Datepicker, we encouter a problem when used in Google Chrome: when we enter a date with a day higher than 12, it does not accept it as a valid date, this is because chrome thinks the dateformat is mm/dd/yyyy. We tried to solve this by adding code to try to force the date settings into dd/mm/yyyy $(\'.date\').datepicker({ dateFormat: \"dd/mm/yy\" }); Is there any way to resolve this issue, so our datepicker will accept dd/mm/yyyy values? We only have this issue in google

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

怎甘沉沦 提交于 2019-11-26 03:44:46
问题 I\'m making an AngularJS directive for a jQuery date picker plugin which should update a ng-model when the datepicker date has changed. Here is the code so far: angular.module(\'bootstrap-timepicker\', []).directive(\'timepicker\', [ function() { var link; link = function(scope, element, attr, ngModel) { element.datetimepicker(); element.on(\'dp.change\', function(event) { // update ngModel ? }); }; return { restrict: \'A\', link: link, require: \'ngModel\' }; } ]); How can I update ngModel