datepicker

Rails DatePicker - Object [object Object] has no method 'datepicker'

帅比萌擦擦* 提交于 2019-12-25 08:25:29
问题 I'm trying to add datepicker to my rails 3.2.8 application. Since it is rails 3+, I didn't add anything to the application.html.erb. My application.js is the following: // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // //

Jquery datepicker selected date not assigning the value

半城伤御伤魂 提交于 2019-12-25 08:00:10
问题 I have a date picker associated with an editor field for selecting the date. But when i select the date, the selection is showing in the editor field but the value is not getting assigned to the respective element. My code is as follows: jQuery: $("#JobDate").click(function () { $(this).datepicker({ dateFormat: 'dd/mm/yy' }).datepicker("show"); }); cshtml code <tr class="spaceUnder"> <td>@Html.LabelFor(model => model.JobDate)</td> <td>@Html.EditorFor(model => model.JobDate)</td> </tr> I would

How to get the date on a datepicker?

旧城冷巷雨未停 提交于 2019-12-25 07:59:05
问题 I am really new to javascript and jquery. I wanted to get the value of the date selected by the user via datepicker, and use the value in my javascript. The name of my datepicker is birthDate. This is my html code for the date picker: <guis:datePicker required="true" label="Birthdate" bean="${accountInfo}" field="birthDate" value="${accountInfo?.birthDate?:"none"}" noSelection="${['null':'']}"/> My javascript is: <script type="text/javascript"> function isOfLegalAge() { var currDate = new

jQuery Datepicker in Angular2 application. Input format should differ from display format

坚强是说给别人听的谎言 提交于 2019-12-25 07:49:34
问题 i'm trying to use a jQuery Datepicker in my angular application. From the server I get a date object, format yy-mm-dd. When I set this Format as "dateFormat" option my date is displayed right. But I like to get the following Format only for the UI: dd.mm.yy. When I set this format in the options the date 1959-12-31 results in 05.03.2022. And this is also the Format that I get from the datepicker if I click on the Save button. So the only working format is yy-mm-dd, it would be great if anyone

Datepicker onSelect to format new date range

半腔热情 提交于 2019-12-25 07:48:36
问题 I have 2 datepickers, one is a fromDate and one is a toDate. I can highlight the range from the fromDate to the toDate successfully in beforeShowDay(), but I need it to highlight when new values are selected. This triggers the onSelect statement. Is there a way to either: 1) trigger the beforeShowDay again? or 2) get all the dates of the new range and apply a css class to them? beforeShowDay: function(date){ if (date >= initialFromDate && date <= initialToDate) { return [true, 'ui-individual

datepicker and textfields

早过忘川 提交于 2019-12-25 07:33:18
问题 I am new to ios development and need to know how to set up two text fields which get dates from date pickers. Here's the code: .h file #import <UIKit/UIKit.h> @interface DatePickerForTermins : UIViewController<UITextFieldDelegate> { //NSDate *frmDate; UIActionSheet *dateSheet; UIActionSheet *dateSheet2; } @property (weak, nonatomic) IBOutlet UITextField *fromDateTextField; @property (weak, nonatomic) IBOutlet UITextField *toDateTextField; @property (weak, nonatomic) IBOutlet UILabel

StringResult+format doesn't seem to work in Webix datepicker

拥有回忆 提交于 2019-12-25 07:27:48
问题 I expect that stringResult will give me an output that corresponds to the specified format , but it always looks like YYYY-MM-DD HH:MM Full code here. For example, I've tried the following config: { view:"datepicker", stringResult:true, format:"%Y-%F-%d" }, But the output is still the same. So, is it a bug? Or am I doing something wrong? Thank you in advance! 回答1: [Updated] As mentioned by Loj, I agree with it. Thus, there are 2 solutions possible: 1. Custom Format The format property you

Jquery - DateTimePicker set max datetime

你说的曾经没有我的故事 提交于 2019-12-25 06:59:29
问题 I have 2 datetimepicker. 1 is From , another is To . how to I limit my To datetimepicker to be 30 minutes after From ? I know how to limit the maximum date, but I dont know how to limit the maximum date and time. for example : If From is 2016/05/11 00:00 then max of To would be 2016/05/11 00:30 But, if From is 2016/05/11 23:55 then max of To would be 2016/05/12 00:25` my current code : $("#From").datetimepicker({ onClose: function (selectedDate, instance) { if (selectedDate != '') { $("#To")

Bootstrap datepicker not working correctly

我的梦境 提交于 2019-12-25 06:47:37
问题 in my webapp I'm using bootstrap components; in one of my pages I'm trying to put a bootstrap datepicker, or better a datetimepicker, still with no luck. My css and js imports are (in order): bootstrap.css datepicker.css jquery.js bootstrap.js bootstrap-datepicker.js The code I'm writing is: <div class="container"> <div class="row"> <div class='col-sm-6'> <div class="form-group"> <div class='input-group date'> <input data-format="dd/MM/yyyy hh:mm:ss" type='text' class="form-control" id=

Can't access DatePicker.ValidationCallback in my code

醉酒当歌 提交于 2019-12-25 06:22:56
问题 I have a simple DatePickerFragment that extends DialogFragment. I'm wanting to set a validation callback so I can prevent "OK" being selected if an invalid date is picked. I first tried setMaxDate and that grays out the invalid choices but still allows them to be selected and OK to be pressed. So I was hoping setting the validation callback would be the solution. abstract public class DatePickerFragment extends DialogFragment implements DatePickerDialog.OnDateSetListener { public