Search Results

Search found 1206 results on 49 pages for 'bootstrap datepicker'.

Page 3/49 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to select a dynamic datepicker instance in order to extend it with jQuery

    - by JaredC
    I'm trying to control positioning of a jQuery datepicker element. I like the solution offered at http://stackoverflow.com/questions/1818670/how-to-control-positioning-of-jqueryui-datepicker for overriding the _checkOffset fn: $.extend(window.DP_jQuery.datepicker,{_checkOffset:function(inst,offset,isFixed){return offset}}); However, this results in a 'window.DP_jQuery is undefined' error. Upon inspection, I can see that the DP_jQuery object in the DOM gets named with a random string, like so: DP_jQuery_123456. If I use this full name in the above code, it works wonderfully. My question is whether there's a way to exend the _checkOffset fn for a datepicker instance without knowing before-hand what the instance name is? For example, can I use some sort of wildcard to select all datepicker instances that begin with 'DP_jQuery_'? Thanks

    Read the article

  • setting minDate in datepicker in Rails

    - by Sakshi Jain
    I need to apply minDate attribute to the datepicker in Rails App. In _admin_controls.html.erb <%= f.input :end_date, wrapper: :append do %> <div id="datepicker" class="datepicker input-group edit-left"> <%= f.text_field :end_date, :class => "datetime form-control" %> application.js contains jQuery(document).on('focus', 'input.datetime', function() { opts = {format: 'M dd, yyyy', autoclose: true}; jQuery(this).datepicker(opts); jQuery(".datepicker").css("z-index",10000); }); What should be the javascript to do so only for _admin_controls.html.erb?

    Read the article

  • bootstrap: Uncaught TypeError: Object [object Object] has no method 'tooltip', 'typeahead'

    - by DarkKnightFan
    I am trying to use the tooltip, typeahead, datepicker features of bootstrap. But I keep getting these errors in the console! Uncaught TypeError: Object [object Object] has no method 'tooltip' Uncaught TypeError: Object [object Object] has no method 'typeahead' This is how my imports look like: <link href="css/bootstrap.css" rel="stylesheet"> <link href="css/datepicker.css" rel="stylesheet"> <link href="css/bootstrap-responsive.css" rel="stylesheet"> <script type="text/javascript" src="js/jquery-1.8.0.js"></script> <script type="text/javascript" src="js/bootstrap.js"></script> <script type="text/javascript" src="js/bootstrap-datepicker.js"></script> <script type="text/javascript" src="js/bootstrap-typeahead.js"></script> <script type="text/javascript" src="js/highcharts.js"></script> <script type="text/javascript" src="js/exporting.js"></script> <link type="text/css" rel="stylesheet" href="css/jquery.dropdown.css" /> <script type="text/javascript" src="js/jquery.dropdown.js"></script> Some sample code: <a class="btn btn-success" data-toggle="modal" href="#payments" rel="tooltip" data-placement="top" title="Record your payments"> <i class="icon-check icon-white"></i> Payments</a> $("#payments").tooltip('show'); Similarly I have code for datepicker and typeahead. any solution?

    Read the article

  • jQuery UI datepicker will not display - full code included

    - by Bill Brasky
    I am having trouble displaying the jQuery datepicker as shown here: http://jqueryui.com/demos/datepicker/ I believe I downloaded all of the proper files, but to be certain, I started from scratch and ripped the demo site. Not all of it, but what I believed to be the important parts. The result is no datepicker to be shown and no javascript errors. Here is my full code sample: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="http://static.jquery.com/ui/css/base2.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> <script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <script type="text/javascript" charset="utf-8"> jQuery(function(){ jQuery("#datepicker").datepicker(); }); </script> </head> <body> <input type="text" id="datepicker" class="hasDatepicker" /> </body> </html> Any help would be very much appreciated. Thanks!

    Read the article

  • Hover-to-click on jQuery UI datePicker 'next month' and 'prev month' not working

    - by user316727
    Hi there, I have a calendar which is meant to look much like the calendar in Outlook. There is a big field representing the hours in a day, and there is a date navigator. The navigator is the jQuery UI Datepicker. I want users to be able to navigate to a new day by clicking on a date in the datepicker, but also to be able to drag appointments over the datepicker and drop them on a specific date. I have that working now. I also want users, while they are dragging an appointment, to be able to move to next or previous month simply by hovering over the datepicker. So I've added a mouseenter and mouseleave event: one runs a setInterval function which sends a click every 1,5 seconds; the other cancels the interval function. This is where all sorts of things go wrong. As soon as one click has been triggered, the mouseleave function no longer works: in other words, the datepicker keeps flipping over to another month every 1,5 seconds. It seems that the datePicker interferes, or that the click event causes other things to go wrong. What can I do?

    Read the article

  • Jquery datepicker: disable federal holidays

    - by Abu Hamzah
    i am working on asp.net using C# and using jquery datepicker my question is, how can i disable dates which are federal holidays? i have a dynamic dates which comes from sql server. anybody have done something similar or any idea how can i achieve this? $(document).ready(function () { $('#endDate').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function () { }, onClose: function () { $(this).focus(); } }); $('#startDate').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function (dateText, inst) { $('#endDate').datepicker("option", 'minDate', new Date(dateText)); } , onClose: function () { $(this).focus(); } }); }); Thanks.

    Read the article

  • jQuery datepicker minDate variable

    - by d3020
    I'm usung the jQuery datepicker. In my "EndDate" textbox I'd like to use the date selected from the the "StartDate" textbox + 1. How do I do this? I tried this but didn't work. In my start date code I had... test = $(this).datepicker('getDate'); testm = new Date(test.getTime()); testm.setDate(testm.getDate() + 1); Then in my end date code I had... minDate: testm, but the end date still made all the days for the month available. Thanks. Edit. I'm curious as to why this doesn't work. In my start date datepicker I have this.. onSelect: function (dateText, inst) test = dateText Why can't I come down into my end date datepicker and say, minDate: test?

    Read the article

  • jquery datepicker: validate date mm/dd/yyyy

    - by Abu Hamzah
    i have a textbox adn a datepicker next to it and i am using asp.net and the user can enter the date as well select the date from datepicker. how would you validate if the date is entered correct? <script type="text/javascript"> $(document).ready(function () { $('#<%=StartDate.ClientID%>').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function () { }, onClose: function () { $(this).focus(); } }); }); </script>

    Read the article

  • jQuery UI datepicker performance

    - by Richard Ev
    I have a textbox on my web page that is used to specify a date, so I'd like to use the jQuery DatePicker. However, most of my users are locked into using IE6 and the performance of the jQuery DatePicker is a little sluggish in this browser. Can anyone recommend an alternate JavaScript date picker, or any means of improving the display performance of the jQuery DatePicker?

    Read the article

  • Jquery datePicker

    - by Shane
    I have slight issue with the jquery datepicker in that it displays ABOVE the target box. This is due to the way my page is set up. I found the issue with CSS in my page via firebug, unfortunately it conflicts with about 20 elements. Next I tried hooking into the "beforeShow event" which works but then after the event fires it just recalculates and puts it where ever it wants. beforeShow: function() { $('#ui-datepicker-div').show(); var offset = $('#ui-datepicker-div').offset(); $('#ui-datepicker-div').css({ top: (offset.top + 222) + 'px' }) } Does anyone else have any ideas how how I can reposition this? I just need to move it down by about 200 odd pixels.

    Read the article

  • jquery datepicker: select date as back as 6 months

    - by Abu Hamzah
    Start date: user can select start date as back as 6 months. example: if today is 04/23/2010 then i can go back up to 11/23/2009 but not more than 6 months. <script type="text/javascript"> $(document).ready(function () { $('#endDate').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function () { }, onClose: function () { $(this).focus(); } }); $('#startDate').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function (dateText, inst) { $('#endDate').datepicker("option", 'minDate', new Date(dateText)); } , onClose: function () { $(this).focus(); } }); }); update code: var currentDate = new Date(); var currentMonth = currentDate.getMonth() + 1; var sixMonths = currentMonth + 6 currentDate.setMonth(currentDate.currentMonth, sixMonths); var myNewCurrentDate = new Date(currentDate) $('#startDate').datepicker('option', { minDate: myNewCurrentDate }); i am getting currentDate = NaN

    Read the article

  • jQuery UI Datepicker - Disable specific days

    - by Sam
    Is there any (easy) way to set the jQuery UI Datepicker to disallow selection of specific, predetermined days? I was able to get this approach working, however, it produces a null error which prevents it from displaying in IE. 'natDays[...].0' is null or not an object Thanks in advance! UPDATE: Might help if I included some code, right? Anyway, most of this was taken straight from the aforementioned thread: natDays = [ [7, 23], [7, 24], [8, 13], [8, 14], ]; function nationalDays(date) { for (i = 0; i < natDays.length; i++) { if (date.getMonth() == natDays[i][0] - 1 && date.getDate() == natDays[i][1]) { return [false, natDays[i][2] + '_day']; } } return [true, '']; } function noWeekendsOrHolidays(date) { var noWeekend = $.datepicker.noWeekends(date); if (noWeekend[0]) { return nationalDays(date); } else { return noWeekend; } } $(function() { $("#datepicker").datepicker({ inline: true, minDate: new Date(2009, 6, 6), maxDate: new Date(2009, 7, 14), numberOfMonths: 2, hideIfNoPrevNext: true, beforeShowDay: $.datepicker.noWeekends, altField: '#alternate', }); }); Thanks again!

    Read the article

  • Call jquery datepicker from link and send the date through a post call

    - by Alex
    Hi all, I need to make the datepicker show when I click on a link and then send the selected date to a different page through a post call. T tried to use this code for the link call: $(".click-on-link").click(function(){ $('#datepicker').datepicker({ changeMonth: true, changeYear: true, dateFormat: 'dd/mm/yy', firstDay: 1 }); }); but it's not working. Any idea? Thanks!

    Read the article

  • Twitter Bootstrap TypeAhead to work like DropDown List / Select Tag with Autocomplete Feature

    - by Dinesh P.R.
    I want to have a DropDown List / < Select HTML Tag behaviour with AutoComplete Feature using Twitter Bootstrap TypeAhead. The link here achieves the feature of Combo Box where user can provide his own input also. I want to restrict the User to select only from the option provided. Is there any way to tweek the Twitter Bootstrap TypeAhead Plugin to emulate the behaviour of DropDown List / Tag with Autocomplete Feature. I have referred the Following question before posting Adding a dropdown button to Twitter bootstrap typeahead component

    Read the article

  • datepicker common options but different altField altFormat

    - by Legio X
    Using jquery-ui datepicker I would like to use altField and altFormat to 2 datepickers on the same page but I can't figure out how to add these 2 options which are specific to each datepicker along with my common set of options. Code sample below. #dt1 does not work, but #dt2 works. How can I get #dt1 to work while using the datepickerOpts? var datepickerOpts = { minDate: -2, changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd' }; $('#dt1').datepicker(datepickerOpts, {altField: '#alt1', altFormat: 'mm-dd-yy' }); $('#dt2').datepicker({ minDate: -2, changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', altField: '#alt2', altFormat: '@' });

    Read the article

  • update text on click of date with jQuery UI datepicker

    - by stevoyoung
    I have two related questions... How do I update an HTML element (let's say a p tag) with the correct date when I click on a day in the jQuery UI datepicker plug in? If I have another way to selecte a date aside from the datepicker, how do I then update the datepicker's selected date (it's adds a class of "ui-state-active" to the date)?

    Read the article

  • How to make a jquery datePicker button image unclickable

    - by Farzana
    I have a jquery UI datePicker in my page. I have a text box on which the date is displayed. The code is: $("#cal").datepicker({ minDate: new Date(), defaultDate: new Date(), buttonImage: '/images/calendar.gif', constrainInput: false, closeText: 'Close', showButtonPanel: true, showButtonText: 'Choose a date', buttonImageOnly : true, showOn : 'button' }); $("#till").datepicker('setDate', today); I want to disable this on some conditions. I use the following code to disable: $("#cal").datePicker('disable'); It blacks out the text box but the image is still clickable. The problem is in IE, the date picker pop up comes up but does not close when the image button associated with the date picker is clicked. I also tried to bind a onclick function with the image to make it non-clickable. But that does not work as well. How can make the date picker image button non-clickable when the date picker is disabled. Any help would be appreciated. Thanks, Farzana

    Read the article

  • Navbar Dropdown in Bootstrap 3

    - by user2333842
    I recently started learning and using Bootstrap 3. I figured I would start with something simple- a header and a dropdown bar. I used the code from the Bootstrap website. I started out with the basic Bootstrap template, then added the bootstrap navbar. This is my code so far. <!DOCTYPE html> <html> <head> <title>WEBSITE NAME</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="../../assets/js/html5shiv.js"></script> <script src="../../assets/js/respond.min.js"></script> <![endif]--> </head> <body> <h1>WEBSITE NAME</h1> <nav class="navbar navbar-default" role="navigation"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse navbar-ex1-collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Tutorials</a></li> <li><a href="#">Software</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li><a href="#">Separated link</a></li> <li><a href="#">One more separated link</a></li> </ul> </li> </ul> <form class="navbar-form navbar-left" role="search"> <div class="form-group"> <input type="text" class="form-control" placeholder="Search"> </div> <button type="submit" class="btn btn-default">Submit</button> </form> <ul class="nav navbar-nav navbar-right"> <li><a href="https://twitter.com/"><span class="glyphicon glyphicon-comment"></span> Twitter</a></li> <li><a href="https://youtube.com/"><span class="glyphicon glyphicon-facetime-video"></span> YouTube</a></li> </ul> </li> </ul> </div><!-- /.navbar-collapse --> </nav> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="//code.jquery.com/jquery.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> </body> </html> The dropdown menu is absolutely not working at all- hovering or clicking it. What do I need to do?

    Read the article

  • Simple html page using Bootstrap

    - by Athashri
    I am writing a simple HTML page using the Twitter Bootstrap. But the navbar and links are rendered as normal HTML on the browser. I have referred to multiple sites but the same steps are given everywhere. I am not sure where I am going wrong. Code: <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <link rel= "stylesheet" href= "css/bootstrap.css" type="text/css"> <title> Bootstrap example</title> </head> <body> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="js/bootstrap.js"></script> <h1>Hello, world!</h1> <div class ="container"> <h1><a href="#">Bootstrap Site</a></h1> <div class="navbar"> <div class="navbar-inner"> <div class="container"> <ul class="nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Projects</a></li> <li><a href="#">Services</a></li> <li><a href="#">Downloads</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> </div> </div> </div> </div> </body> </html>

    Read the article

  • POST from edit/create partial views loaded into Twitter Bootstrap modal

    - by mare
    I'm struggling with AJAX POST from the form that was loaded into Twitter Bootstrap modal dialog. Partial view form goes like this: @using (Html.BeginForm()) { // fields // ... // submit <input type="submit" value="@ButtonsRes.button_save" /> } Now this is being used in non AJAX editing with classic postbacks. Is it possible to use the same partial for AJAX functionality? Or should I abstract away the inputs into it's own partial view? Like this: @using (Ajax.BeginForm()) { @Html.Partial("~/Views/Shared/ImageEditInputs.cshtml") // but what to do with this one then? <input type="submit" value="@ButtonsRes.button_save" /> } I know how to load this into Bootstrap modal but few changes should be done on the fly: the buttons in Bootstrap modal should be placed in a special container (the modal footer), the AJAX POST should be done when clicking Save which would first, validate the form and keep the modal opened if not valid (display the errors of course) second, post and close the modal if everything went fine in the view that opened the modal, display some feedback information at the top that save was succesful. I'm mostly struggling where to put what JS code. So far I have this within the List view, which wires up the modals: $(document).ready(function () { $('.openModalDialog').click(function (event) { event.preventDefault(); var url = $(this).attr('href'); $.get(url, function (data) { $('#modalContent').html(data); $('#modal').modal('show'); }); }); }); The above code, however, doesn't take into the account the special Bootstrap modal content placeholder (header, content, footer). Is it possible to achieve what I want without having multiple partial views with the same inputs but different @using and without having to do hacks with moving the Submit button around?

    Read the article

  • WPF DatePicker IsEnabled property not changing appearance

    - by Jonathan
    I think I have found an issue with the DatePicker in the toolkit, perhaps some of you gurus can check it out. The issue is when setting the IsEnabled property of the DatePicker. If set in XAML, it stays grey even if you set the IsEnabled to true at run time. The same goes for the other way around should it start off being enabled. The button just changes the IsEnabled property of the date picker, you will see that when it becomes enabled, the style remains grayed out. <Window x:Class="WpfApplication3.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:tk="http://schemas.microsoft.com/wpf/2008/toolkit" Title="Window1" Height="300" Width="300"> <StackPanel> <tk:DatePicker x:Name="txtDate" IsEnabled="False"></tk:DatePicker> <Button Height="25" Click="Button_Click"></Button> </StackPanel> </Window> private void Button_Click(object sender, RoutedEventArgs e) { txtDate.IsEnabled = !txtDate.IsEnabled; }

    Read the article

  • jQuery datepicker returns "inst is null" error when loaded via AJAX

    - by Robert
    I'm loading content via an AJAX call into a table row added to the DOM on the fly. I'm calling the datepicker functionality in my callback function and the calendar shows fine. However, when I click on the date, I get an error: inst is null. Here's my code: $(document).ready(function() { $(".edit").live("click", function() { //Delete previously loaded edit row $("#tempEditRow").remove(); //Get the record id of the row to be edited var recordID = $(this).parent("td").parent("tr").attr("id"); //Add the new row to the document $(this).parent("td").parent("tr").after("<tr id=\"tempEditRow\"><td id=\"tempEditCell\" colspan=\"100\"></td></tr>") //Get a reference to the new row var container = $("#tempEditCell"); //Populate the container populateContainer("/wpm/includes/ajax_editApplication.cfm?id=" + recordID, container); }); }); function populateContainer(ajaxUrl, container) { //Populate the container $.ajax({ url: ajaxUrl, cache: false, success: function(html){ $(container).html(html); $('.datepicker').datepicker(); } }); } I've tried deleting the hasDatepicker class, deleting any references to the datepicker, etc. but nothing is working. Thanks in advance for helping!

    Read the article

  • Jeditable with jQuery UI Datepicker

    - by BrynJ
    I need to have a click to edit element on a page, that will in turn invoke an instance of the jQuery UI Datepicker. Currently, I'm using JEditable to provide the in place editing, which is working fine. However, I have a date control input that I would like to have appear as a calendar, which is where the fun starts. I've found a Comment in the this blog by Calle Kabo (the page is a little mashed unfortunately) that details a way to do this: $.editable.addInputType("datepicker", { element: function(settings, original) { var input = $("<input type=\"text\" name=\"value\" />"); $(this).append(input); return(input); }, plugin: function(settings, original) { var form = this; $("input", this).filter(":text").datepicker({ onSelect: function(dateText) { $(this).hide(); $(form).trigger("submit"); } }); } }); However, I can't get the above to work - no errors, but no effect either. I've tried placing it within the jQuery document ready function and also outside of it - no joy. My UI Datepicker class is date-picker and my Jeditable class is ajaxedit, I'm sure the above inaction is due to the need to reference them somehow in the code, but I don't know how. Also, the Jeditable control is one of many element ids, if that has a bearing. Any ideas from those more in the know?

    Read the article

  • Datepicker BeforeShowDay CSS problem with content styling

    - by Darklomba
    I think I'm not the only one having this problem. Whenever I try to apply a BeforeShowDay a new CSS class, the content of the "special date" is not being modified. I tried changing the default theme, adding a new class, but this is affecting only the outside border and not the inside content. Using Firebug I found that the html code being printed is the following: <td class=" ui-state-content ui-state-anulados" onclick="DP_jQuery.datepicker._selectDay('#datepicker',9,2009, this);return false;" title="Paddle"> <a class="ui-state-default" href="#">16</a> </td> So, my class would be ui-state-content ui-state-anulados but I notice that the ui-state-default class is being applied automatically and I suspect that this may be the problem. I really don't know how to solve this. I've been looking inside ui.datepicker.js code and I think I found the line that is giving me this problems. It is line number 1394 and it has the following code. (ui.datepicker.js) (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' + Any clues on how this can be done? Thanks in advance. Manuel.-

    Read the article

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