Search Results

Search found 488 results on 20 pages for 'datepicker'.

Page 7/20 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Jquery datepicker mindate, maxdate

    - by Cesar Lopez
    I have the two following datepicker objects: This is to restrict the dates to future dates. What I want: restrict the dates from current date to 30 years time. What I get: restrict the dates from current date to 10 years time. $(".datepickerFuture").datepicker({ showOn: "button", buttonImage: 'calendar.gif', buttonText: 'Click to select a date', duration:"fast", changeMonth: true, changeYear: true, dateFormat: 'dd/mm/yy', constrainInput: true, minDate: 0, maxDate: '+30Y', buttonImageOnly: true }); This is to restrict to select only past dates: What I want: restrict the dates from current date to 120 years ago time. What I get: restrict the dates from current date to 120 years ago time, but when I select a year the maximum year will reset to selected year (e.g. what i would get when page load from fresh is 1890-2010, but if I select 2000 the year select box reset to 1880-2000) . $(".datepickerPast").datepicker({ showOn: "button", buttonImage: 'calendar.gif', buttonText: 'Click to select a date', duration:"fast", changeMonth: true, changeYear: true, dateFormat: 'dd/mm/yy', constrainInput: true, yearRange: '-120:0', maxDate: 0, buttonImageOnly: true }); I need help with both datepicker object, any help would be very much appreciated. Thanks in advance. Cesar.

    Read the article

  • Populating array of input fields as alternate fields using jQuery UI datepicker

    - by Micor
    I am using jquery ui datepicker in order to populate start and end dates for multiple events on the same page, the number of events is dynamic and I need to post day, month and year as separate fields, so I have something like this: <input type="text" name="event[0].startDate" class="date"/> <input type="hidden" name="event[0].startDate_day" class="startDate_day" /> <input type="hidden" name="event[0].startDate_month" class="startDate_month" /> <input type="hidden" name="event[0].startDate_year" class="startDate_year" /> <input type="text" name="event[0].endDate" class="date"/> <input type="hidden" name="event[0].endDate_day" class="endDate_day" /> <input type="hidden" name="event[0].endDate_month" class="endDate_month" /> <input type="hidden" name="event[0].endDate_year" class="startDate_year" /> event[1]... event[2]... I started working on jQuery functionality and this is what I have so far, which will populate alternate fields for startDate by class, of course it will not do what I need because I need to populate by field name rather then class: $(".date").datepicker({ onClose: function(dateText,picker) { $('.startDate_month').val( dateText.split(/\//)[0] ); $('.startDate_day').val( dateText.split(/\//)[1] ); $('.startDate_year').val( dateText.split(/\//)[2] ); }}); I need help figuring out how can I get the name of the input field within datepicker function so the alternate field assignment done by that field name + _day, month, year so this function can work for all the events on the page, making function above look more like: $(".date").datepicker({ onClose: function(dateText,picker) { $('input[' + $name + '_month' + ']').val( dateText.split(/\//)[0] ); $('input[' + $name + '_day' + ']').val( dateText.split(/\//)[1] ); $('input[' + $name + '_year' + ']').val( dateText.split(/\//)[2] ); }}); Hope that makes sense :) Thanks

    Read the article

  • JQuery datepicker not working

    - by IniTech
    I'm completely new to JQuery and MVC. I'm working on a pet project that uses both to learn them and I've hit my first snag. I have a date field and I want to add the JQuery datepicker to the UI. Here is what I have done: Added <script src="../../Scripts/jquery-1.3.2.min.js" type="text/javascript"></script> to the site.master Inside my Create.aspx (View), I have <asp:Content ID="Create" ContentPlaceHolderID="MainContent" runat="server"> <h2> Create a Task</h2> <% Html.RenderPartial("TaskForm"); %> </asp:Content> and inside "TaskForm" (a user control) I have: <label for="dDueDate"> Due Date</label> <%= Html.TextBox("dDueDate",(Model.Task.TaskID > 0 ? string.Format("{0:g}",Model.Task.DueDate) : DateTime.Today.ToString("MM/dd/yyyy"))) %> <script type="text/javascript"> $(document).ready(function() { $("#dDueDate").datepicker(); }); </script> As you can see, the above checks to see if a task has an id 0 (we're not creating a new one) if it does, it uses the date on the task, if not it defaults to today. I would expect the datepicker UI element to show up, but instead I get: "Microsoft JScript runtime error: Object doesn't support this property or method" on the $("#dDueDate").datepicker(); Ideas? It is probably a very simple mistake, so don't over-analyze. As I said, this is the first time I've dealt with MVC or JQuery so I'm lost as to where to start.

    Read the article

  • Use JQuery UI Datepicker with Icons from Jquery UI Theme

    - by Craig McGuff
    I have a datepicker control setup using the JQuery UI, I am also using the JQuery UI themes which provide a bunch of default icons that I want to use. The DatePicker allows for specifying a specific image, i.e.: <script type="text/javascript"> $(document).ready(function() { $("#DateFrom").datepicker({ showOn: 'button', buttonImageOnly: true, buttonImage: 'images/ui-icon-calendar.png' }); }); </script> To display an icon from the icon set you use something like: <span class="ui-icon ui-icon-calendar"></span> Is there an easy to integrate the two or do I just need to hack out the styles/images manually?

    Read the article

  • jQuery UI Datepicker on a qTip

    - by Justin Ethier
    I am trying to display a qTip containing a jQuery UI datepicker control (the version bundled with jQuery UI). However the datepicker's calendar opens behind the qTip. I tried manually setting the calendar's z-order from firebug, which does allow the calendar to open in front of the qTip. However, in this case clicking on the calendar has the effect of closing the qTip as (I assume) it is part of the page's content. I am still working through this but wanted to ask - has anyone run into this problem before? Any possible workarounds to get the datepicker to work?

    Read the article

  • disable jquery datepicker

    - by IrfanRaza
    Hello friends!!! I have used jquery datepicker in my .aspx page. The control is working fine. What i need is to disable the control if the textbox on which it is linked is disabled. For ex. I am showing datepicker on textbox "txtDateOfAssignment". If the Enabled property of this textbox is false then datepicker should not be active on that. Anybody have an idea? Thanks in advance.

    Read the article

  • Trigger jQueryUI datePicker on button click, send result to disabled input field

    - by Enrique
    Hi I've been searching for a way to do this, but could not find anything I want to have a: a disabled input text field, called #XX. This input will store the selected value from datepicker (as this input is disabled I won't be able to use this to trigger the datePicker) A button, besides #XX. When user clicks this button, datePicker will show. User will select the date, and this date will be assigned to disabled input #XX. I want this so user can't change manually -by typing crap- the selected date Also, should I validate if date was entered using #XX.val()? or is there a better way? Thanks

    Read the article

  • JQuery UI datepicker in Asp.Net MVC

    - by Frederik
    I have tried to use some of the widgets in JQuery UI on an Asp.Net MVC site without luck. For example the basic datepicker from jQuery UI - functional demos. I have created a simple MVC project and added the script references in Site.Master like this: <script src="../../Scripts/jquery-1.2.6.min.js" type="text/javascript"></script> <script src="../../Scripts/jquery-ui-personalized-1.5.3.min.js" type="text/javascript"></script> <link href="../../Content/Site.css" rel="stylesheet" type="text/css" /> <link href="../../Content/ui.datepicker.css" rel="stylesheet" type="text/css" />" In the Index.aspx file I have cleared all default content and added the following: <script type="text/javascript"> $("#basics").datepicker(); </script> <input type="text" size="10" value="click here" id="basics"/> The core jQuery works fine. Any clues?

    Read the article

  • Append indexed input fields with attached datepicker widget

    - by Micor
    I am looking for the most efficient way to add a set of fields with datepicker widget attached on click event. So here I have a set of indexed events being generated on a page: <div id="events"> <div class="event"> <input type="text" id="event_0_startDate" name="event[0].startDate" class="date"/> <input type="hidden" id="event_0_startDate_day" name="event[0].startDate_day" /> <input type="hidden" id="event_0_startDate_month" name="event[0].startDate_month" /> <input type="hidden" id="event_0_startDate_year" name="event[0].startDate_year"/> </div> <div class="event"> <input type="text" id="event_1_startDate" name="event[1].startDate" class="date"/> <input type="hidden" id="event_1_startDate_day" name="event[1].startDate_day" /> <input type="hidden" id="event_1_startDate_month" name="event[1].startDate_month" /> <input type="hidden" id="event_1_startDate_year" name="event[1].startDate_year" /> </div> .... more event divs .... </div> <a href="#" id="add_event">Add event</a> .. with datepicker widget attached: $(".date").datepicker({ onClose: function(dateText,picker) { var prefix = $(this).attr('id'); $('#' + prefix + '_month').val( dateText.split(/\//)[0] ); $('#' + prefix + '_day').val( dateText.split(/\//)[1] ); $('#' + prefix + '_year').val( dateText.split(/\//)[2] ); } }); I need a function that will add inside div id="events" after the last div class="event" another div class="event" where N is the next index and attach datepicker widget above to the new input field with class="date" like: <div class="event"> <input type="text" id="event_N_startDate" name="event[N].startDate" class="date"/> <input type="hidden" id="event_N_startDate_day" name="event[N].startDate_day"/> <input type="hidden" id="event_N_startDate_month" name="event[N].startDate_month" /> <input type="hidden" id="event_N_startDate_year" name="event[N].startDate_year" /> </div> Thank you.

    Read the article

  • DatePicker on android

    - by SWE
    I have a problem in DatePicker on android I can't make it smaller than default size This is the XML code which used: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <DatePicker android:id="@+id/datePicker1" android:layout_width="70dp" android:layout_height="40dp" android:layout_alignParentLeft="true" android:layout_below="@+id/addevent_location" /> </RelativeLayout> Any help please

    Read the article

  • Jquery DatePicker Customization

    - by mahendra
    I am using Jquery datepicker plugin and my requirement is I want to allow user to select Month and Year when he click on the Header say 'May 2010'. I want to make the Header say 'May 2010' of datepicker as a link and when he clicks on it, it should display a small div or option to select month and year with Apply and close buttons and when he click on apply the dat picker should change with the selected month and year. Is it possible?

    Read the article

  • How do I get selected date set by jQuery UI Datepicker

    - by Steven
    I'm setting the start date of an event using jQuery UI Datepicker. Now I need to retrieve the date I selected. I'm trying to use $('#startDate').datepicker('getDate'), but this returns NULL. Using FirBug, I see that the input value is nothing <input type="text" name="startDate" value="" id="startDate" class="hasDatepicker"> I'm able to retrieve selected date when using jQuery serialize. So how can I retrieve the selected date?

    Read the article

  • I can't get datepicker to work

    - by vikitor
    Hi, I need a field that displays the datepicker. I followed the example given by the JQuery UI documentation and haven't managed to get it to work. My html where I have my text field is: <div class="editor-field"> <input type = "text" name = "DatePublished" id = "Published" /> <%= Html.ValidationMessage("DatePublished" ,"*") %> </div> This HTML is in a partial view, lets call it pv.ascx, and it is called in the main page as a modal box: <div id = "ModalBox"> <% Html.RenderAction("pv", "Example"); %> </div> The thing is, that I try to call the datepicker creation anytime I enter the main page, and I do it in my javascript file app.js: $().ready(function() { var place = window.location.pathname; var placesplit = place.split("/"); //Depending on the location we are on, we execute different subroutines $('#Published').datepicker(); }); But nothing happens when I focus on the text field. What is wrong? Could it be that being called from a partial view it doesn't work? Thank you everyone, vikitor

    Read the article

  • Jquery Template textbox not showing datepicker

    - by pirzada
    I am using Datepicker on one of the the textbox in Jquery template but its not popping up. Outside of the template working fine. Below is what I want to do. jQuery().ready(function () { //$("#HireDate").datepicker(); $("#HireDate").datepicker({dateFormat:'dd-mm-yy', showAnim:'fadeIn'}) }); <script id="UserDetailTemplate" type="text/x-jquery-tmpl"> <table style="width:100%;"> <tbody> <tr> <td style="width:25%;font-weight:bold;">HireDate:</td> <td><input type="text" id="HireDate" value="${ HireDate }" /></td> </tr> </table> </td> </tr> </tbody> </table> </script>

    Read the article

  • How to link jQuery UI datepicker functionality with a select list

    - by take2
    I'm trying to connect jQuery UI's datepicker with a select list. I have found one explanation on jQuery's Forum ( forum.jquery.com/topic/jquery-ui-datepicker-with-select-lists), but I can't get it working. There are input and select list both declared: <select id="selectMonth"><option value="01">Jan</option><option value="02">Feb</option> <option value="03">Mar</option><option value="04">Apr</option>...</select> <select id="selectDay"><option value="01">1</option><option value="02">2</option> <option value="03">3</option><option value="04">4</option>...</select> <select id="selectYear"><option value="2012">2012</option><option value="2013">2013</option> <option value="2014">2014</option>...</select> <p>Date: <input type="text" id="selectedDatepicker" /></p> This is the script: $(function() { $('#selectedDatepicker').datepicker({ beforeShow: readSelected, onSelect: updateSelected, minDate: new Date(2012, 1 - 1, 1), maxDate: new Date(2014, 12 - 1, 31), showOn: 'both', buttonImageOnly: true, buttonImage: 'img/calendar.gif'}); // Prepare to show a date picker linked to three select controls function readSelected() { $('#selectedDatepicker').val($('#selectMonth').val() + '/' + $('#selectDay').val() + '/' + $('#selectYear').val()); return {}; } // Update three select controls to match a date picker selection function updateSelected(date) { $('#selectMonth').val(date.substring(0, 2)); $('#selectDay').val(date.substring(3, 5)); $('#selectYear').val(date.substring(6, 10)); } }); And here is the fiddle: http://jsfiddle.net/xKXZm/ They are not connected properly, the only "connected behaviour" is that when you click on the input button, it picks up the value of the select list. On the other hand, the select list never picks up the value of the input nor will the input pick up the value of the select list until you click on it.

    Read the article

  • How to run date picker onclick event?

    - by Nitz
    Hey Guys I am using this date picker from jqueryui. If see on that page, then u will find that they have just written in one function...means this... $(function() { $("#datepicker").datepicker(); }); </script> But i want to open my date picker on one text box click event. so i have written this $("#datepicker").datepicker(); in one function which i am calling on textbox onclick event. but in this there is one problem coming.. i am only get date picker on second time click on text box. if i click first time after page load then date picker will not come but as soon as i click second time then date picker is coming? WHY? AND CAN I DO IT ON FIRST CLICK? yes i know this already happening perfect if i put first code but i want it on my function.

    Read the article

  • Jquery Date Picker: Append Start Date to End Date and display dates in the future only.

    - by Tim
    Hello, I am using Jquery Date pickers to get Start and End Dates for an application I am building. I have two datepickers, one for a start date and one for an end date. When someone clicks a date in the start date picker I need that date to be appended automatically to the end date picker. I also need the end date picker to select future dates only from the date that has been appended to it. There are two demos on the jquery datepicker site that do what I want, but I am unsure how to combine them to both do what I want. Example One: This example shows how you can tie two date pickers together so that the date selected in one influences the dates that can be selected in the other $(function() { $('.date-pick').datePicker() $('#start-date').bind( 'dpClosed', function(e, selectedDates) { var d = selectedDates[0]; if (d) { d = new Date(d); $('#end-date').dpSetStartDate(d.addDays(1).asString()); } } ); $('#end-date').bind( 'dpClosed', function(e, selectedDates) { var d = selectedDates[0]; if (d) { d = new Date(d); $('#start-date').dpSetEndDate(d.addDays(-1).asString()); } } ); }); Example Two: An example showing inline date pickers which are linked together and trigger behaviour in each other... $(function() { $('#date-view1') .datePicker({inline:true}) .bind( 'dateSelected', function(e, selectedDate, $td) { $('#date1').val(selectedDate.asString()); $('#date-view2, #date-view3').dpSetSelected(selectedDate.addDays(3).asString()); } ); $('#date-view2') .datePicker({inline:true}) .bind( 'dateSelected', function(e, selectedDate, $td) { $('#date2').val(selectedDate.asString()); } ); $('#date-view3').datePicker(); $('#form-check') .bind( 'click', function() { alert('date1=' + $('#date1').val() + '\n' + 'date2=' + $('#date2').val()); } ); }); I have tried many combinations of the codes listed above, but I have not been able to get the desired results. Thanks for all your help, Tim

    Read the article

  • Changing Jquery Calendar size using google hosted theme

    - by Ali
    I am trying to implement the Jquery datepicker using a google hosted theme. But the Calendar is too big. Can I make it a smaller version by altering the function itself seeing I cant change the theme? <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/start/jquery-ui.css" type="text/css" media="all" /> <script type="text/javascript" src="jquery.js"></script> $(function() { $("#datepicker").datepicker({ dateFormat: $.datepicker.W3C}); }); Thanks

    Read the article

  • can you use jquery datepickers renderCalendar with the multimonth plugin

    - by oo
    using jquery date picker you can render specific cells the way you want. (in my case i have a list of dates that i want to highlight as they are important days) i see that datepicker itself supports this here: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendarCallback.html but i dont see the multimonth implementation having an option for renderingcustomDates http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiMonth3.html was this missed out in the implementation to expose this functionality?

    Read the article

  • WPF DatePicker UpdateSourceTrigger PropertyChanged not working...

    - by user557352
    I am using MVVM and want to enable a button on text change of datepicker control.. XAML Code Binding on DatePicker SelectedDate="{Binding InactiveDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" DisplayDate="{Binding InactiveDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Binding on Button View Model Code I am using a DelegateCommand for button click View Model Delegate Initialization SubmitCommand = new DelegateCommand(OnSubmitRequested, AllowSubmit, Controller); The AllowSubmit implementation private bool AllowSubmit() { return InactiveDate != null; } InactiveDate Property implementation public DateTime? InactiveDate { get { return _inactiveDate; } set { _inactiveDate = value; SubmitCommand.RaiseCanExecuteChanged(); PropertyChanged(this, new PropertyChangedEventArgs("InactiveDate")); } } SubmitCommand.RaiseCanExecuteChanged() should enable the button once I enter any character on DateTimePicker but it is not happening.

    Read the article

  • Add calendar datepicker with Jquery on dynamic table.

    - by Cesar Lopez
    I am trying to add a Jquery calendar picker to a text box at the time of creation, but I cant find how. When I press a button, it will create a table, the element I want to attach the Jquery calendar picker is: var txtDate = createTextInput(i, "txtDate", 8, 10); txtDate.className = "datepicker"; this.newcells[i].appendChild(txtDate); I tried adding at the end : txtDate.datepicker(); But does not work. Can anybody help? Thanks. Note: CreateTextInput is: function createTextInput(i, strName, size, maxLength) { var input = document.createElement('<input>'); input.type = "text"; input.name = strName; input.id = strName + i; input.size = size; input.maxLength = maxLength; return input; }

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >