datetimepicker

Set the format of a Kendo DateTimePicker date sent to the controller

半城伤御伤魂 提交于 2019-12-07 01:59:30
问题 I'm using a Kendo DateTimePicker in my application. The value I get from it in my application is Wed Aug 13 2014 00:00:00 GMT+0200 (Romance Daylight Time) I can't parse this to a DateTime. I get a "String was not recognized as a valid DateTime." error. How can I set the format of the date I get from the DateTimePicker?? Is there an option in Kendo DateTimePicker??t 回答1: If you Need to Change the Date that you get from your application you can do as below var dateobj=kendo.parseDate("Wed Aug

Set max and min datetime in jquery datetimepicker

六月ゝ 毕业季﹏ 提交于 2019-12-06 16:48:01
问题 I am using jquery datetimepicker.In which i want to set mindate and time which is the value selected in second datetimepicker. What i tried is : $('#date_start').datetimepicker({ autoSize: true, changeYear: true, changeMonth: true, buttonImageOnly: true, onSelect: function (selected) { $('#date_end').datetimepicker("option", "minDate", selected); } }); I refered this Jquery - DateTimePicker set max datetime link.But its not a clear solution for my issue. $('#date_end').datetimepicker({

SQL statement with datetimepicker

半腔热情 提交于 2019-12-06 09:48:31
问题 This should hopefully be a simple one. When using a date time picker in a windows form, I want an SQL statement to be carried out, like so: string sql = "SELECT * FROM Jobs WHERE JobDate = '" + dtpJobDate.Text + "'"; Unfortunately, this doesn't actually provide any results because the JobDate field is stored as a DateTime value. I'd like to be able to search for all records that are on this date, no matter what the time stored may be, any help? New query: SqlDataAdapter da2 = new

How to close DateTimePicker with a double click

被刻印的时光 ゝ 提交于 2019-12-06 01:30:57
I am using a jQuery DateTimePicker addon (By: Trent Richardson ) and it will only close after you select the date AND the time. However some users don't care about the time and they want the Calendar to close after they choose the date only. I managed to close the Calendar after picking the Date only but I need to implement a double click and not a single click. How do I do that? Here is my code: $(jqCompletedEndID).datetimepicker({ ampm: true, onSelect: function(){ $(this).datepicker("hide"); $(this).blur(); } }); I know there is a dblclick event in Javascript but not sure how to apply it in

DataBinding a DateTimePicker raises “DataBinding cannot find a row in the list that is suitable for all bindings.”

爱⌒轻易说出口 提交于 2019-12-06 00:59:33
I have a simple test application which reproduces an error I encountered recently. Basically I have a simple WinForm with databound TextBox and DateTimePicker controls, and a button. When I execute the code below (on the button click) , I get the error "DataBinding cannot find a row in the list that is suitable for all bindings". If I move the DataSource assignment into the form's constructor, I don't get the error. If I remove the data binding for the DateTimePicker, it works fine. Can anyone explain what the problem is ? public partial class Form1 : Form { private BindingSource bs; public

DateTimePicker never updates!

孤街醉人 提交于 2019-12-05 13:37:05
问题 I have some DateTimePicker s in a form that never update. I've tried Value and Text , Invalidate() and then Update() and also Refresh() ... Nothing seems to change their values from the current date! No matter what I set, the current dates are (relatively)today's! Is this a .NET 3.5 bug or what? (No, I cannot use .NET 4 on this project.) If you really want some code, then here it is: dateTimePicker1.Value = user.BirthDay; . Also, if I write MessageBox.Show(user.BirthDay.ToString()); I get a

How to change the date format of a DateTimePicker in vb.net

不问归期 提交于 2019-12-05 13:16:15
How can I change the date format of a DateTimePicker in vb.net so that the date is shown in the format dd/mm/1990, without any time value? I have tried changing the format to "short", and while this provides the date formatting I require it does not remove the time. You need to set the Format of the DateTimePicker to Custom and then assign the CustomFormat. Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load DateTimePicker1.Format = DateTimePickerFormat.Custom DateTimePicker1.CustomFormat = "dd/MM/yyyy" End Sub Use: dateTimePicker.Value.ToString("yyyy/MM

unable to bind event to datetimepicker plugin

狂风中的少年 提交于 2019-12-05 10:52:47
I am using Trent Richardson's jQuery UI Timepicker. I know the plugin has been modified to override $.datepicker._selectDate so that the picker will stay open when a date is selected. That's great. However, I have been asked to have the picker close when double-clicking a date. Everything else remains the same, including a button for closing the picker when done, etc., only they want the double-click to work as well. I have attempted to bind the double-click event to calendar dates in several ways (mostly variations of $('.ui-datepicker-calendar a').bind('dblclick', function () {/*do something

Cannot get Jquery DateTimePicker to display in mvc4

南笙酒味 提交于 2019-12-05 07:31:31
问题 here is my script <script type="text/javascript"> $(document).ready(function () { // alert("jquery working fine, still no display.."); $(".datepicker").datetimepicker({ showAnim: 'slideDown', dateFormat: 'dd/mm/yyyy' }); }); </script> <input type="text" class="datepicker" /> The actual Datepicker works great, firebug shows this script, the jqueryUI, the timepicker-addon.js, slider.js, and datepicker.js, jquery is selecting the textboxes. but alas, still no datetimepicker displaying I've tried

How to obtain utc time in jQuery datetimepicker

China☆狼群 提交于 2019-12-05 05:27:22
I am using the trying this jQuery datetimepicker to obtain date and time data. I am able to get most of the things out (format, display, etc). However, I wasn't able to get the date and time in UTC format. I am only able to obtain the date and time in local format. Does anyone know how to modify it to get the date and time? or remove off the "Now" button in the popup? I ran into the same issue today, and found this old thread. You can override $.datepicker._gotoToday to use UTC Time when you click the "now" button. //make the now button go to "now" in utc, not local $.datepicker._gotoToday =