datepicker

ASP.NET Can't set value to datepicker from code behind

孤街醉人 提交于 2019-12-11 23:49:49
问题 I have a datepicker field $(function () { $("#dateTextBox").datepicker({ changeMonth: true, changeYear: true }); $("#dateTextBox").datepicker("option", "dateFormat", "dd/mm/yy"); }); In code behind, on button click, I'm trying to set value to datepicker field: dateTextBox.Value = date.ToString("dd/MM/yyyy"); But after postback, textbox is empty... 回答1: In order to achieve this, you need to read details from client side using hidden field. This hiddenfield value can be set at server side. For

$.datepicker not defined

与世无争的帅哥 提交于 2019-12-11 23:21:09
问题 I cannot coax the datetimepicker to work. Datepicker works fine. But the add-on has not worked after about 7 hours of attempts. Firebug shows no 404's. All jQuery libraries are included with the theme framework as well. I tried replacing all instances of $.datepicker with jQuery.datepicker in the script. This made no difference. I tried moving scripts above or below or combining them. The same error persists. I have examined several related answers in this forum and many, many others to no

Disable days in Datepicker

流过昼夜 提交于 2019-12-11 23:12:30
问题 I'm trying to disable certain days of the calendar, but I can not. I'm using this datepicker https://github.com/eternicode/bootstrap-datepicker/blob/master/docs/index.rst. The javascript code I have is this, I work all I need except the days you want to disable. var disabledDays = ['11/29/2013', '11/27/2013', '11/28/2013']; function daysDisabled(date) { for (var i = 0; i < disabledDays.length; i++) { if (new Date(disabledDays[i]).toString() == date.toString()) { return [false, '']; } } return

Nested resources in css with :after and :before

萝らか妹 提交于 2019-12-11 23:08:30
问题 I need to differentiate on between finish / start date. So I would like on datepicker CSS rules applied to one text-field and others to the other. <input id="mzti-start-date" type="text" name="start_date" class="datepicker mzti-dp-width mzti-field-height" placeholder="Start date"> <input id="mzti-finish-date" type="text" name="finish_date" class="datepicker mzti-dp-width mzti-field-height" placeholder="End date"> And here were my CSS files: #mzti-finish-date.datepicker:before { content: '';

jQuery datepicker restricts selectable year

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 22:57:33
问题 I have two datepickers which only return years (i.e. 2014/2015). Datepicker 56 must be equal to or greater than datepicker55, which in one resepect the below code achieves. Datepicker56 when selected can be equal to or greater than datepicker55 however if I change datepicker55 to 2011/2012 then select datepicker56 to amend my year as being 2011/2012 it won't let me, it's first selectable year sticks at 2015. Datepicker56 can be selected on its own also. However if 55 is selected and then

Select week number or date in JQuery UI datepicker [closed]

帅比萌擦擦* 提交于 2019-12-11 22:14:31
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . This is the first time that I do something with jQuery UI and also my JS skills are at the beginner level. What's my problem: I wanna use JQuery UI datepicker to select: getting a single date when I click on a day or getting a date range when I click on the week number. How can I

Octobercms set dynamically datepicker minDate

六月ゝ 毕业季﹏ 提交于 2019-12-11 21:17:42
问题 I need to set dynamically public function filterFields($fields, $context = null) { $return_date = $fields->return_date->value; if(empty($return_date)) { $fields->return_date->minDate = Carbon::now(); } } Not work! 回答1: Hmm, may be datetime widget is setting this restrictions at init time and filterfields is fired after that so it can not use new modified data . to over come this we set config data before init , we use controller method formExtendFieldsBefore add this method to your controller

JQuery mobile datepicker doesn't work

我与影子孤独终老i 提交于 2019-12-11 19:39:35
问题 I'm trying to use a standard datepicker for HTML, JQuery Mobile. But for some reason any version i try doesn't work. I think it might be something with the stylesheet I have selected or the JQuery Mobile links. Here is the code: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta content="text/html; charset=windows-1255" http-equiv="content-type"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/resources/demos/style.css" /> <link rel

Angular 5 binding material 5 DatePicker to form field

China☆狼群 提交于 2019-12-11 18:54:18
问题 I am trying to bind an Angular materials 5 date picker to a form field, i am following the official tutorial here but there isn't any information about how to bind the calendar value to a field within a form, it could also be bound to a class attribute, but that also does not work. My template is simply: <form #theForm="ngForm"> .......Some fields....... <mat-form-field> <input matInput [matDatepicker]="fixDate" placeholder="Choose a date" name="fixDate"> <mat-datepicker-toggle matSuffix [for

CJuiDatePicker in CGridview as form field

落花浮王杯 提交于 2019-12-11 18:06:31
问题 I am displaying form elements in my CGridView and would like datepicker, but it complains CDataColumn and its behaviors do not have a method or closure named "widget". I have modified DATEIN using the method described in Use a widget in a statically-called method However i think it works partially as when i do a sort or the datepicker does not work. its working only on initial load. <script> $(document).ready(function() { /* $("input[name*='DATEIN'] ").each(function(){ jQuery(this).datepicker