jquery-ui

How to set min and max date in the JQueryUI DatePicker in ASP.Net MVC 5 Application

跟風遠走 提交于 2020-07-22 03:12:28
问题 Ok, so after following this Date Picker Tutorial I am able to create a datepicker. But I want to set some limit to the date picker. For example I only want the date picker to allow from 5th Jan 2017 to 5th Aug 2017". How can I achieve this. Note that I don't want to change the dateFormat property of the datepicker. Also, dateformat property is working properly. Below is what I have till now: <script type="text/javascript"> $(function () { $(".date-picker").datepicker({ dateFormat: 'dd-M-yy',

CKEditor 4 and jQuery UI sortable removes content after sorting

[亡魂溺海] 提交于 2020-07-20 07:35:27
问题 I've ran into an issue with CKEditor 4 and jQuery UI's sortable method where if I sort a container that has a CKEditor instance, it removes the value and throws an error "Uncaught TypeError: Cannot call method 'getSelection' of undefined". It also makes the editor uneditable. I was able to get around this in CKEditor 3 with one of the following hacks found here: CKEditor freezes on jQuery UI Reorder In looking at the Chrome DOM inspector, it appears that the contents of the iframe are removed

How to hide dialog buttons when a jQuery-ui dialog is opened

谁说胖子不能爱 提交于 2020-07-10 04:53:47
问题 When opening a jQuery-UI dialog, how can I hide a button (for instance, hide the "Save" button)? http://jsfiddle.net/ba6jwh54/1/ <!-- head --> <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/ui-lightness/jquery-ui.css" type="text/css" rel="stylesheet" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js" type="text/javascript"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.js" type="text/javascript"><

Show image in JQuery ui autocomplete

不羁的心 提交于 2020-07-08 12:05:09
问题 I have a script with JQuery ui autocomplete that works perfectly. There is a search process that shows user firsname and lastname. But in my databse, there is also users' pic and I want to display it in the suggestion with the fristname and lastname. ( in the database, pic contains the image url) The script: $(function() { $("#search").autocomplete({ source: "autocomplete.php", minLength: 1, select: function(event, ui) { var url = ui.item.id; if(url != '') { location.href = '...' + url; } },

Jquery datepicker beforeShowDay after initializing

回眸只為那壹抹淺笑 提交于 2020-07-05 08:01:16
问题 When I am setting beforeShowDay after initializing it doesn't work $("#dater").datepicker(); $("#dater").datepicker({ beforeShowDay: renderCalendarCallback }); It will work when I will change and call beforeShowDay for first time $("#dater").datepicker({ beforeShowDay: renderCalendarCallback }); $("#dater").datepicker(); How can I fix this to call beforeShowDay in first scenario too? Note that I can't remove first initialization, because it is unreachable for me. You can test this scenarios

jQuery UI: sortable('toArray') returns an empty array

本秂侑毒 提交于 2020-07-04 06:31:45
问题 This has me stumped. The follow code returns ",,,,,,": <script type="text/javascript"> $(function() { $('#listB').sortable({ connectWith: '#listA', update: function(event, ui) { var result = $(this).sortable('toArray'); alert(result); } }); $('#listA').sortable({ connectWith: '#listB' }); }); </script> <div id="boxA"> <ul id="listA" class="myList"> <li value="1">Item A</li> <li value="2">Item B</li> <li value="3">Item C</li> <li value="4">Item D</li> <li value="5">Item E</li> <li value="6"

Autocomplete with username and image

我们两清 提交于 2020-06-17 09:34:07
问题 I am using autocomplete to dropdown username and user profile picture, i am getting the username correctly but profile picture is showing default images instead of the user profile picture. I do not know if i am passing this right in jquery. Here is what i have tried: Model: class Profile(models.Model): user = models.OneToOneField(settings.AUTH_USER_MODEL,on_delete=models.CASCADE,blank=True,null=True) profile_pic = models.ImageField(upload_to='ProfilePicture/', default="ProfilePicture/user

jQuery UI Datepicker destroy and reinitialize calendar with new DefaultDate

我只是一个虾纸丫 提交于 2020-05-31 04:36:30
问题 I'm building a booking system, and want our checkout date picker calendar to show appropriate dates. For example, I check in June 5th 2018, the checkout calendar should start in June 2018. To accomplish this we initialize the checkout calendar with defaultDate set to the check in date. Simple, and it works the first time. If, however, we go back and change the check in date, the checkout calendar keeps the old check in date for its default. I thought I had fixed this problem by destroying the

jQuery UI datepicker not working?

送分小仙女□ 提交于 2020-05-30 08:08:09
问题 I have the jQuery ui datepicker showing up in my web app, but when I go to choose a date, it doesn't do anything. And the default Html5 datepicker is still showing up. My datepicker image How can I disable the Html5 one for the jQuery Ui datepicker to work? This is how I did my code: Create.cshtml @Html.LabelFor(model => model.EnrollmentDate, htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> @Html.EditorFor(model => model.EnrollmentDate, new { htmlAttributes =

How to add link to all search below autocomplete popup in jQuery.ui.autocomplete?

怎甘沉沦 提交于 2020-05-29 11:39:28
问题 I have search suggestion autocompletion using jQuery UI autocomplete plugin. http://jqueryui.com/autocomplete/ But how to add on the bottom of results popup item which behaves like on Quora(see below). Javascript $("#question_search").autocomplete({ source:$('#question_search').data('source'), html: true, appendTo: "#search_results", select: function( event, ui ) { window.location=ui.item.value; return false; }, focus: function( event, ui ) { }, open: function( event, ui ) { }); View <div id=