Search Results

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

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

  • dynamic date formats in eyecon's Bootstrap Datepicker

    - by Jennifer Michelle
    I need to update my datepickers' date format (mm.dd.yyyy etc) using a select box. I am currently using Eyecon's Bootstrap Datepicker because it had the smallest files size that I could find (8k minified), and includes the date formats I need. I also tried to trigger date format changes in several other datepickers without any success. Fiddle: http://jsfiddle.net/Yshy7/8/ Is there an obvious way to trigger a change from the select box to the datepickers? //date format var dateFormat = $('#custom_date_format').val() || "mm/dd/yyyy"; $('#custom_date_format').change(function() { var dateFormat = $(this).val(); }); //start and end dates var nowTemp = new Date(); var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0); var checkin = $('.j-start-date').datepicker({ format: dateFormat, onRender: function(date) { //return date.valueOf() < now.valueOf() ? 'disabled' : ''; } }).on('changeDate', function(ev) { if (ev.date.valueOf() > checkout.date.valueOf()) { var newDate = new Date(ev.date) newDate.setDate(newDate.getDate()); checkout.setValue(newDate); } checkin.hide(); $('.j-end-date')[0].focus(); }).data('datepicker'); var checkout = $('.j-end-date').datepicker({ format: dateFormat, onRender: function(date) { return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : ''; } }).on('changeDate', function(ev) { checkout.hide(); }).data('datepicker');

    Read the article

  • Jquery Datepicker with XML file

    - by matt
    an extension of my last question, http://stackoverflow.com/questions/2562986/getdate-with-jquery-datepicker , I am trying to use the jquery datepicker to load specific info from xml file dependent on the date selected by the user. Similar code but i am trying to load and parse an xml file to read contents of the file for the particular date. In a perfect world the user would tap a date and below the datepicker html output would give the user specific times for the selected date instead of my last project of an image. my probelm is nothing is loading, so my question is what am i doing wrong? my code is as follows <!DOCTYPE html> <link type="text/css" href="css/ui-darkness/jquery-ui-1.8.custom.css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.custom.min.js"></script> <script type="text/javascript"> $(function(){ // Datepicker $('#datepicker').datepicker({ dateFormat: 'yy-mm-dd', inline: true, minDate: new Date(2010, 1 - 1, 1), maxDate:new Date(2010, 12 - 1, 31), altField: '#datepicker_value', onSelect: function(){ var day1 = $("#datepicker").datepicker('getDate').getDate(); var month1 = $("#datepicker").datepicker('getDate').getMonth() + 1; var year1 = $("#datepicker").datepicker('getDate').getFullYear(); var fullDate = year1 + "" + month1 + "" + day1; //var str_output ="<img src=\"http://69.89.20.27/images/a" + fullDate +".png\" width=\"100%\"/>"; //"<h1>"+fullDate+"</h1>"; //"<img src=\"http://69.*.*.*/images/a" + fullDate +".png\"/>"; //$('#page_output').html(str_output); var doc = loadXMLDoc('date.xml'); // loading the XML file var el = doc.getElementsByTagName('_'+date); // retrieving the elements corrsponding to a date, eg: _20100103 var page_output = document.getElementById('page_output'); if(el.length >= 1) { // matched XML data found for the specified date var dt = el[0].getElementsByTagName('date'); var great_times = el[0].getElementsByTagName('great_times'); var good_times = el[0].getElementsByTagName('good_times'); var str_output = "<h1><center>" + dt[0].childNodes[0].nodeValue + "</center></h1><br/><br>"; str_output += "<b>Excellent Times:</b><br> " + great_times[0].childNodes[0].nodeValue + "<br/><br>"; str_output += "<b>Good Times:</b><br> " + good_times[0].childNodes[0].nodeValue + "<br/><br>"; $('#page_output').html(str_output);// writing the results to the div element (page_out) } else { alert("Sorry","Action not allowed on this page"); page_output.innerHTML = ''; // No XML data found for the selected date reloadmainwDate(); return false; } return true; } }); //hover states on the static widgets $('#dialog_link, ul#icons li').hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); } ); }); //var img_date = .datepicker('getDate'); //var day1 = $("#datepicker").datepicker('getDate').getDate(); //var month1 = $("#datepicker").datepicker('getDate').getMonth() + 1; //var year1 = $("#datepicker").datepicker('getDate').getFullYear(); //var fullDate = year1 + "-" + month1 + "-" + day1; //var date = $('#datepicker').datepicker({ dateFormat: 'dd-mm-yy' }); //var str_output = "<h1><center><p>"+ date + "</p></center></h1>"; //$('#page_output')[0].innerHTML = str_output; // writing the results to the div element (page_out) </script> <script> function loadXMLDoc(dname) { var xmlDoc; // IE 5 and IE 6 if(typeof ActiveXObject != 'undefined') { xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async=false; xmlDoc.load(dname); return xmlDoc; } else if (window.XMLHttpRequest) // firefox { xmlDoc=new window.XMLHttpRequest(); xmlDoc.open("GET",dname,false); xmlDoc.send(""); return xmlDoc.responseXML; } alert("Error loading document"); return null; } <!-- Datepicker --> <div id="datepicker"></div> <!-- Highlight / Error --> <div id="page_output"></div> </body>

    Read the article

  • Highlighting dates between two selected dates jQuery UI Datepicker

    - by Ralph
    I have one datepicker with numberOfMonths set to 2. Arrival Date and Departure Date are determined using this logic (within onSelect): if ((count % 2)==0) { depart = $("#datepicker-1").datepicker('getDate'); if (arriv depart) { temp=arriv; arriv=depart; depart=temp; } $("#check-in").val($.datepicker.formatDate("DD, MM d, yy",arriv)); $("#check-out").val($.datepicker.formatDate("DD, MM d, yy",depart)); } else { arriv = $("#datepicker-1").datepicker('getDate'); depart = null; if ((arriv depart)&&(depart!=null)) { temp=arriv; arriv=depart; depart=temp; } $("#day-count").val(''); $("#check-in").val($.datepicker.formatDate("DD, MM d, yy",arriv)); $("#check-out").val($.datepicker.formatDate("DD, MM d, yy",depart)); } if(depart!=null) { diffDays = Math.abs((arriv.getTime() - depart.getTime())/(oneDay)); if (diffDays == 0) { $("#day-count").val((diffDays+1)+' Night/s'); } else { $("#day-count").val(diffDays+' Night/s'); } } Getting the number of days within these 2 dates has no problem What I want now is highlight those dates starting from the Arrival to Departure I tried working around the onSelect but had no luck. I am now using beforeShowDay to highlight these dates but I can't seem to figure it out Got a sample from here Basically, it is customized to highlight 11 or 12 days after the selected date (Here's the code from that link). $('#datePicker').datepicker({beforeShowDay: function(date) { if (selected != null && date.getTime() selected.getTime() && (date.getTime() - selected.getTime()) Since I am new to using the UI, and the logic is not clear to me yet, I can't seem to figure this out. Any ideas on how I can make this highlight dates between the Arrival and Departure using my aforementioned logic used in determining the two?

    Read the article

  • JQuery DatePicker - pop calendar dialog on 'OnSelect' of another datepicker

    - by sajanyamaha
    I have two JQuery datepickers to select 'StartDate' and 'EndDate'.My requirement is to automatically popup the end date calendar after startDate has been selected. I have tried all the steps in COMMENTED HERE. The code here succesfully triggers the focus of 'EndDate' calendar,but it displays for a second and hides off. $(document).ready(function() { //Runs when tab is loaded var dateFormat = "dd/mm/yy"; var today=new Date(); today.setMonth(today.getMonth()-1); $("#ctl00_ContentPlaceHolder1_datepicker1").datepicker({ minDate: 0, dateFormat:dateFormat, //maxDate: '+12M +31D', onSelect: function(dateText, inst){ var the_date = new Date($.datepicker.parseDate(dateFormat,dateText)); //var end=(the_date.getDate()+1) + '/' + (the_date.getMonth()+1) + '/' + the_date.getFullYear(); $("#ctl00_ContentPlaceHolder1_datepicker2").datepicker('option', 'minDate', the_date); // TRIED ALL THESE //document.getElementById('ui-datepicker-div').style.display = 'block'; //document.getElementById('ui-datepicker-div').style.left = '635.5px'; //$("#ctl00_ContentPlaceHolder1_datepicker2").datepicker("show"); //$("#ctl00_ContentPlaceHolder1_datepicker2").datepicker(); //$("#ctl00_ContentPlaceHolder1_datepicker2").focus(); //$('#foo').slideUp(300).delay(800).fadeIn(400); //$("#ctl00_ContentPlaceHolder1_datepicker2").trigger("focus"); $('#ctl00_ContentPlaceHolder1_datepicker2').focus(); } }); $("#ctl00_ContentPlaceHolder1_datepicker2").datepicker({ //maxDate: '+12M +31D', dateFormat:dateFormat, onSelect: function(dateText, inst){ } }); });

    Read the article

  • getDate with Jquery Datepicker

    - by matt
    i am trying to get date from my implementation of jquery date picker, add it to a string and display the resulting image in my div. Something however is just not working. Can anyone check out the code and have a look at it? The code is supposed to take the date from date picker, combine it in a string which is to have the necessary code to display tag, images are located in /image and in the format aYY-MM-DD.png, new to this date picker and can't quite get it down yet. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.custom.css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.custom.min.js"></script> <script type="text/javascript"> $(function(){ // Datepicker $('#datepicker').datepicker({ dateFormat: 'yy-mm-dd', inline: true, minDate: new Date(2010, 1 - 1, 1), maxDate:new Date(2010, 12 - 1, 31), altField: '#datepicker_value', }); //hover states on the static widgets $('#dialog_link, ul#icons li').hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); } ); }); //var img_date = .datepicker('getDate'); var day1 = $("#datepicker").datepicker('getDate').getDate(); var month1 = $("#datepicker").datepicker('getDate').getMonth() + 1; var year1 = $("#datepicker").datepicker('getDate').getFullYear(); var fullDate = year1 + "-" + month1 + "-" + day1; var str_output = "<h1><center><img src=\"/images/a" + fullDate + ".png\"></center></h1><br/><br>"; page_output.innerHTML = str_output; // writing the results to the div element (page_out) </script> </head> <body style="background-color:#000;color:#fff;margin: auto auto;"> <!-- Datepicker --> <div id="datepicker"></div> <!-- Highlight / Error --> <p>Date Value: <input type="text" id="datepicker_value" /></p> <div id="page_output" style="text-align:center; margin-top:80px; margin-bottom:20px; "></div> </body>

    Read the article

  • jQuery Datepicker - Programatically Limit Second Datepicker

    - by Dodinas
    Hello all, I've recently been using the following piece of code to limit my 2nd Date picker (end date) so that it does not precede the date of the 1st Date picker. $("#datepicker").datepicker({ minDate: +5, maxDate: '+1M +10D', onSelect: function(dateText, inst){ var the_date = dateText; $("#datepicker2").datepicker('option', 'minDate', the_date); } }); $("#datepicker2").datepicker({ maxDate: '+1M +10D', onSelect: function(dateText, inst){ } }); However, lately, I wanted to format my datepickers using: dateFormat: 'yy-mm-dd' But now, the 2nd datepicker actually allows the user to pick a date 1 day before. For example, if the user picks the 1st date: 2010-04-03, when the 2nd Datepicker pops up, they are able to pick 2010-04-02 (1 day before their first selected date). I do not want the user to be able to pick a date that was before their first selected day. Any ideas why this isn't working after I added in the "dateFormat"?

    Read the article

  • Jquery UI Datepicker not displaying

    - by scott
    UPDATE I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. UPDATE END I having an issue with the JQuery UI datepicker. The datepicker is being attached to a class and that part is working but the datepicker is not being displayed. Here is the datepicker code I am using and the inline style that is being generated when I click in the input box that has the class ".datepicker". $('.datepicker').datepicker({dateFormat:'dd/mm/yy'}); display:none; left:418px; position:absolute; top:296px; z-index:1; If I change the display:none to display:block the datepicker works fine except it dosen't close when I select a date. Jquery libraries in use: jQuery JavaScript Library v1.4.2 jQuery UI 1.8 jQuery UI Widget 1.8 jQuery UI Mouse 1.8 jQuery UI Position 1.8 jQuery UI Draggable 1.8 jQuery UI Droppable 1.8 jQuery UI Datepicker 1.8

    Read the article

  • jQuery UI " $("#datepicker").datepicker is not a function"

    - by burnt1ce
    When i use DatePicker, jQuery's UI plugin, in an existing .aspx page i get errors that "$("#datepicker").datepicker is not a function". However, when I copy and paste the same code that creates and uses the DatePicker to an html file that's also in the same directory as the aspx page, it works flawlessly. This leads me to assume that there are some JS files in the aspx page that's preventing the DatePicker or maybe jQuery's UI JS files to load properly. Can anyone confirm my beliefs or provide any tips on finding the culprit that's interfering with jQuery's UI plugins?

    Read the article

  • Rails 3 and Bootstrap 2.1.0 - can't fix my footer

    - by ExiRe
    I have Rails application with bootstrap 2.1.0 (i use twitter-bootstrap-rails gem for that). But i can't get working footer. It is not visible unless i scroll down the page. I can't get how to fix that. Application.html.haml !!! %html %head %title MyApp = stylesheet_link_tag "application", :media => "all" = javascript_include_tag "application" = csrf_meta_tags %meta{ :name => "viewport", :content => "width=device-width, initial-scale=1.0" } %body %div{ :class => "wrapper" } = render 'layouts/navbar_template' %div{ :class => "container-fluid" } - flash.each do |key, value| = content_tag( :div, value, :class => "alert alert-#{key}" ) %div{ :class => "row-fluid" } %div{:class => "span10"} =yield %div{:class => "span2"} %h2 Test sidebar %footer{ :class => "footer" } = debug(params) if Rails.env.development? bootstrap_and_overrides.css.less @import "twitter/bootstrap/bootstrap"; body { padding-top: 60px; } @import "twitter/bootstrap/responsive"; // Set the correct sprite paths @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png'); @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png'); // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) // Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not // have the proper paths. So for now we use the absolute path. @fontAwesomeEotPath: '/assets/fontawesome-webfont.eot'; @fontAwesomeWoffPath: '/assets/fontawesome-webfont.woff'; @fontAwesomeTtfPath: '/assets/fontawesome-webfont.ttf'; @fontAwesomeSvgPath: '/assets/fontawesome-webfont.svg'; // Font Awesome @import "fontawesome"; // Your custom LESS stylesheets goes here // // Since bootstrap was imported above you have access to its mixins which // you may use and inherit here // // If you'd like to override bootstrap's own variables, you can do so here as well // See http://twitter.github.com/bootstrap/less.html for their names and documentation // // Example: // @linkColor: #ff0000; //MY CSS IS HERE. html, body { height: 100%; } footer { color: #666; background: #F5F5F5; padding: 17px 0 18px 0; border-top: 1px solid #000; } footer a { color: #999; } footer a:hover { color: #efefef; } .wrapper { min-height: 100%; height: auto !important; height: 10px; margin-bottom: -10px; }

    Read the article

  • Searching for a jQuery Datepicker

    - by codeworxx
    Hey Guys, i hope you can help me. I'm looking for a "special" Datepicker JS/jQuery which needs some special Options: I'll try to explain you with the help of the jQuery UI Datepicker - the same function as the Inline Datepicker - 2 Datepickers has to be shown at the same time - it should be possible to disable Dates !!!!!!!!!!! (thats the Problem why i do not use the jQuery UI Datepicker !) Can someone give me a good hint? Thx and have a nice weekend. Sascha

    Read the article

  • Responsive Inline Elements with Twitter Bootstrap

    - by MightyZot
    Originally posted on: http://geekswithblogs.net/MightyZot/archive/2013/11/12/responsive-inline-elements-with-twitter-bootstrap.aspxTwitter Boostrap is a responsive css platform created by some dudes affiliated with Twitter and since supported and maintained by an open source following. I absolutely love the new version of this css toolkit. They rebuilt it with a mobile first strategy and it’s very easy to layout pages once you get the hang of it. Using a css / javascript framework like bootstrap is certainly much easier than coding your layout by hand. And, you get a “leg up” when it comes to adding responsive features to your site. Bootstrap includes column layout classes that let you specify size and placement based upon the viewport width. In addition, there are a handful of responsive helpers to hide and show content based upon the user’s device size. Most notably, the visible-xs, visible-sm, visible-md, and visible-lg classes let you show content for devices corresponding to those sizes (they are listed in the bootstrap docs.) hidden-xs, hidden-sm, hidden-md, and hidden-lg let you hide content for devices with those respective sizes. These helpers work great for showing and hiding block elements. Unfortunately, there isn’t a provision yet in Twitter Bootstrap (as of the time of this writing) for inline elements. We are using the navbar classes to create a navigation bar at the top of our website, www.crowdit.com. When you shrink the width of the screen to tablet or phone size, the tools in the navbar are turned into a drop down menu, and a button appears on the right side of the navbar. This is great! But, we wanted different content to display based upon whether the items were on the navbar versus when they were in the dropdown menu. The visible-?? and hidden-?? classes make this easy for images and block elements. In our case, we wanted our anchors to show different text depending upon whether they’re in the navbar, or in the dropdown. span is inherently inline and it can be a block element. My first approach was to create two anchors for each options, one set visible when the navbar is on a desktop or laptop with a wide display and another set visible when the elements converted to a dropdown menu. That works fine with the visible-?? and hidden-?? classes, but it just doesn’t seem that clean to me. I put up with that for about a week…last night I created the following classes to augment the block-based classes provided by bootstrap. .cdt-hidden-xs, .cdt-hidden-sm, .cdt-hidden-md, .cdt-hidden-lg {     display: inline !important; } @media (max-width:767px) {     .cdt-hidden-xs, .cdt-hidden-sm.cdt-hidden-xs, .cdt-hidden-md.cdt-hidden-xs, .cdt-hidden-lg.cdt-hidden-xs {         display: none !important;     } } @media (min-width:768px) and (max-width:991px) {     .cdt-hidden-xs.cdt-hidden-sm, .cdt-hidden-sm, .cdt-hidden-md.cdt-hidden-sm, .cdt-hidden-lg.cdt-hidden-sm {         display: none !important;     } } @media (min-width:992px) and (max-width:1199px) {     .cdt-hidden-xs.cdt-hidden-md, .cdt-hidden-sm.cdt-hidden-md, .cdt-hidden-md, .cdt-hidden-lg.cdt-hidden-md {         display: none !important;     } } @media (min-width:1200px) {     .cdt-hidden-xs.cdt-hidden-lg, .cdt-hidden-sm.cdt-hidden-lg, .cdt-hidden-md.cdt-hidden-lg, .cdt-hidden-lg {         display: none !important;     } } .cdt-visible-xs, .cdt-visible-sm, .cdt-visible-md, .cdt-visible-lg {     display: none !important; } @media (max-width:767px) {     .cdt-visible-xs, .cdt-visible-sm.cdt-visible-xs, .cdt-visible-md.cdt-visible-xs, .cdt-visible-lg.cdt-visible-xs {         display: inline !important;     } } @media (min-width:768px) and (max-width:991px) {     .cdt-visible-xs.cdt-visible-sm, .cdt-visible-sm, .cdt-visible-md.cdt-visible-sm, .cdt-visible-lg.cdt-visible-sm {         display: inline !important;     } } @media (min-width:992px) and (max-width:1199px) {     .cdt-visible-xs.cdt-visible-md, .cdt-visible-sm.cdt-visible-md, .cdt-visible-md, .cdt-visible-lg.cdt-visible-md {         display: inline !important;     } } @media (min-width:1200px) {     .cdt-visible-xs.cdt-visible-lg, .cdt-visible-sm.cdt-visible-lg, .cdt-visible-md.cdt-visible-lg, .cdt-visible-lg {         display: inline !important;     } } I created these by looking at the example provided by bootstrap and consolidating the styles. “cdt” is just a prefix that I’m using to distinguish these classes from the block-based classes in bootstrap. You are welcome to change the prefix to whatever feels right for you. These classes can be applied to spans in textual content to hide and show text based upon the browser width. Applying the styles is simple… <span class=”cdt-visible-xs”>This text is visible in extra small</span> <span class=”cdt-visible-sm”>This text is visible in small</span> Why would you want to do this? Here are a couple of examples, shown in screen shots. This is the CrowdIt navbar on larger displays. Notice how the text is two line and certain words are capitalized? Now, check this out! Here is a screen shot showing the dropdown menu that’s displayed when the browser window is tablet or phone sized. The markup to make this happen is quite simple…take a look. <li>     <a href="@Url.Action("what-is-crowdit","home")" title="Learn about what CrowdIt can do for your Small Business">         <span class="cdt-hidden-xs">WHAT<br /><small>is CrowdIt?</small></span>         <span class="cdt-visible-xs">What is CrowdIt?</span>     </a> </li> There is a single anchor tag in this example and only the spans change visibility based on browser width. I left them separate for readability and because I wanted to use the small tag; however, you could just as easily hide the “WHAT” and the br tag on small displays and replace them with “What “, consolidating this even further to text containing a single span. <span class=”cdt-hidden-xs”>WHAT<br /></span><span class=”cdt-visible-xs”>What </span>is CrowdIt? You might be a master of css and have a better method of handling this problem. If so, I’d love to hear about your solution…leave me some feedback! You’ll be entered into a drawing for a chance to win an autographed picture of ME! Yay!

    Read the article

  • JQuery datepicker defaultdate from another datepicker

    - by Paul
    Hi, I have several jquery datepickers on my asp page and I want to set the defaultdate of date picker to be the same as the previous datepicker. I am currently using defaultDate: document.getElementById('<%=txtFirstDate.ClientID%>').value This works okay, but obviously errors if firstDate is null. Should I be using OnSelect function instead? Appreciate any help

    Read the article

  • Set android datepicker date limits

    - by matt
    I am using datePicker in android to display images based on user selected dates. I need to limit said dates to certain days for instance Jan 1st 2010 to Dec 31st 2010. Simple as that i thought but no where can i find the answer on how to limit these dates. Does anyone know how to limit the dates for Android DatePicker

    Read the article

  • jquery ui datepicker is huge

    - by iggnition
    Hi, im trying to add a datepicker to my symfony application and i got it working, but the size of the datepicker is about 3 times bigger than normal (on the demo page). I have not edited any CSS, i just used the default ui lightness theme no modifications. Does anybody have any idea why the size is blown up so big? CSS: http://paste2.org/p/835414 tough i doubt that will be very usefull.

    Read the article

  • Reduce size and change text color of the bootstrap-datepicker field

    - by Lisarien
    Programing an Android application based on HTML5/JQuery launching in a web view, I'm using the Eternicode's bootstrap-datepicker. BTW I'm using Jquery 1.9.1 and Bootstrap 2.3.2 with bootstrap-responsive. The picker is working fine but unfortunately I get yet two issues which I was not able to solve at this time: the picker theme is not respected and some dates are not readable (see the attached picture). Some there is css conflict such as the datepicker's font is displayed white on white background. I'm not able to reduce the size of the date picker field such as it holds on alone row. My markup code is: <div class="row-fluid" style="margin-right:0px!important"> <label id="dateId" class="span6">One Date</label> <div id="datePurchase" class="input-append date"> <input data-format="yyyy-MM-dd" type="text" /> <span class="add-on"> <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i> </span> </div> </div> I init the datepicker by Javascript: $("#dateId").datetimepicker({ pickTime: false, format: "dd/MM/yyyy", startDate: startDate, endDate: endDate, autoclose: true }); $("#dateId").on("changeDate", onChangeDate); Do you get any idea about these issues? Thanks very much

    Read the article

  • Using Knockout.js to bind bootstrap daterange picker and parse span contents

    - by jmkr
    I'm new to knockout and trying to get what should be a simple task up and running. I'm working on an MVC4 .NET app with the intention of binding a date range picker to make ajax requests for updating Highchart graph data. I'm using Dan Grossman's bootstrap-themed date picker and it's been great so far (https://github.com/dangrossman/bootstrap-daterangepicker). The basic goal is to watch the span that this jQuery date ranger picker updates, and then use knockout to pass this value to another part of the app for the ajax request. I've tried everything I can find online.. valueUpdate:change on the span to using some jQuery within knockout to get the same goal done, to using a subscribe function to watch the value of the span before and after the date picker is used. Apparently this uses the jQuery .change() event handler, which is only good on inputs, selects, and textareas.. not spans. Here's the fiddle of what I have so far: http://jsfiddle.net/eyygK/9/ Appreciate any help and input.

    Read the article

  • Updating an interface to bootstrap

    - by Anagio
    I'm updating a web apps interface to bootstrap. There's a lot of existing CSS and Javascript/jQuery i'll have to migrate, most i'll scrap and use bootstraps. But for parts of the app that use datatables and such all that code has to be migrated. I'm working on a development server. The app has a header.phtml sidebar.phtml and a lot of content area view files. Right now i'm building static versions of view files say the header. I then open my existing header.phtml into notepad++ split screen with the static file and copy over the dynamic code. Then replace the old header.phtml with the one I just made. To make sure the header displayed correctly I had to add all the CSS and JS from bootstrap. This is conflicting with the current CSS styles and some JS conflicts as well. Should I go through the app note what JS I absolutely need what I don't and same with the CSS. Then strip all the CSS/JS from the old app that is not needed so it only has bootstraps and any other critical files and not worry about the way pages look as i'm making progress to updating them. I'd be working on mostly a wireframe of the old site without any styles until I get to applying bootstraps. Is this efficient or is there another way I can get through all these files and update them easily?

    Read the article

  • ASP.NET MVC.NET JQueryUI datepicker inside a div loaded/updated with ajax.actionlink

    - by ArjanW
    Im trying to incorporate jqueryUI's datepicker inside a partialview like this: <% using (Ajax.BeginForm("/EditData", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "div1" })) {%> Date: <%= Html.TextBox("date", String.Format("{0:g}", Model.date), new { id = "datePicker"})%> <% } %> <script type="text/javascript"> $(function() { $("#datePicker").datepicker(); }); </script> when i directly call the url to this partial view, so it renders only this view the datepicker works perfectly. (for the purpose of testing this i added the needed jquerry and jquerryui script and css references directly to the partial view) But if i use a Ajax.Actionlink to load this partial view inside a div (called div2, submitting the above form should update div1) like this: <div id="div1"> <%= Ajax.ActionLink("Edit", "/EditData", new { id = Model.id }, new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "div2" } )%> </div> <div2>placeholder for the form</div> the datepicker wont apear anymore. My best guess is the javascript included in the loaded html doesnt get executed, ($(document).ready(function() { $("#datepicker").datepicker(); }); doesnt work either if that's the case how and where should i call the $("datepicker").datepicker(); ? (putting it in the ajaxoptions of the ajax.actionlink as oncomplete = "$(function() { $('#datepicker').datepicker();});" still doesnt work. if thats not the case, then where's my problem?

    Read the article

  • How to modify the style of jQuery DatePicker's disabled dates?

    - by Clay
    Given this page: http://jqueryui.com/demos/datepicker/#min-max And viewing its source: http://jqueryui.com/themeroller/css/parseTheme.css.php I can change the following line (using Chrome's inspect element feature) and see those changes reflected: .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } However, if I try to override my own test page with something like... .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .99 !important; filter:Alpha(Opacity=99) !important; background-image: none !important; color:Red !important; } ...I do not see my changes reflected in the calendar. I can make other changes in my own test page and those are reflected for other classes in the datepicker. So, I'm not having any kind of path issue to the .js or .css files. What am I missing here? UPDATE/SOLUTION Firebug to the rescue...this took care of my styling needs: .ui-datepicker-week-end{color: #c0c0c0 !important;} div#ui-datepicker-div.ui-datepicker{color: #c0c0c0;} div#ui-datepicker-div.ui-datepicker:hover{cursor: default important;} .ui-datepicker-calendar th{color: #222222 !important;}

    Read the article

  • Grails Twitter Bootstrap Plugin Issue with navbar-fixed-top

    - by Philip Tenn
    I am using Grails 2.1.0 and Twitter Bootstrap Plugin 2.1.1 and am encountering an issue with navbar-fixed-top. In order to get the Navbar fixed to the top of the page to behave correctly during resize, the Twitter Bootstrap Docs states: Add .navbar-fixed-top and remember to account for the hidden area underneath it by adding at least 40px padding to the . Be sure to add this after the core Bootstrap CSS and before the optional responsive CSS. How can I do this when using the Grails Plugin for Twitter Bootstrap? Here is what I have tried: main.gsp <head> ... <r:require modules="bootstrap-css"/> <style type="text/css"> body { padding-top: 60px; padding-bottom: 40px; } .sidebar-nav { padding: 9px 0; } </style> <r:require modules="bootstrap-responsive-css"/> <r:layoutResources/> </head> The problem is that Grails Plugin for Twitter Bootstrap takes the content of bootstrap.css and bootstrap-responsive.css and combines them into the following merged file: static/bundle-bundle_bootstrap_head.css. Thus, I am not able to put the body padding style "after core Bootstrap CSS and before Responsive CSS" as per Twitter Bootstrap docs. Here is the View Source HTML that I get from the main.gsp above <style type="text/css"> body { padding-top: 60px; padding-bottom: 40px; } .sidebar-nav { padding: 9px 0; } </style> <link href="/homes/static/bundle-bundle_bootstrap_head.css" type="text/css" rel="stylesheet" media="screen, projection" /> If there is no way to do this, I could always just drop the Grails Twitter Bootstrap Plugin and manually download Twitter Bootstrap and put it my Grails Project's web-app/css, web-app/images, and web-app/js. However, I would like to be able to use the Grails Twitter Bootstrap Plugin. Thank you very much in advance, I appreciate it!

    Read the article

  • prevent autodropdown by jquery datepicker

    - by snarebold
    hi when I append jquery datepicker to my asp textbox, by clicking on it, my browser auto shows the history of the dates i typed in a dropdownlist. Can I prevent this? Set textbox to readonly isn't a good idea because asp.net doesn't read the values from read only fields in code behind. any other ideas? thank you and best regards. marc

    Read the article

  • Bootstrap-Switch options don't take effect

    - by Linda Keating
    I'm using Bootstrap-Switch and the documentation says that options can be passed as an object on initialization. enter link description here And here is a list of options: enter link description here So my code looks like this: var options = { onText: "Yes", onColor: 'primary', offColor: 'danger', offText: "No", animate: true, }; $("[name='radioGroup1']").bootstrapSwitch(options); And it all switch works fine, but none of the defaults are overwritten by the options. Anybody got any examples of how this might work? Thanks

    Read the article

  • How to make multiple segmented inputs in a single input group in Bootstrap

    - by metaculus
    This is how it is supposed to look like on Airbnb home page http://airbnb.com I have tried .input-group-addon and nest in it another <input> like so: <div class="col-lg-6"> <div class="input-group"> <input type="text" class="form-control"> <span class="input-group-addon"> <input type="text" id="nested-input" class="form-control"> </span> <span class="input-group-btn"> <button class="btn btn-default" type="button">Go!</button> </span> </div> </div> </div> And it didn't work. Does Bootstrap support this styling?

    Read the article

  • Twitter Bootstrap Ajax call error in dialog2.js

    - by naveen kumar
    We are using Twitter Bootstrap for my application. I have situation where I have to pull the data from server and show it to popup/model div. We are using dialog2.js for it but it does work. We not want to use .load functionality as we are not using any single url call. We want it to do with “URL” by ajax call and response send back to popup/model content area. We have tried following $('#proposalInDialog2').click(function(event){ var url="abc.do" $('<div/>').dialog2({title: "Goals-Based Proposal", content: url}); }); Please help us to to find out this, thanks

    Read the article

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