w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
jqgrid bug with datepicker control
I have a template: var colDateTemplate = { editable: true, width: 200, align: "center", sortable: true, sorttype: "date", editrules: { date: true }, editoptions: { size: 20, maxlengh: 10, dataInit: function(element) { $(element).datepicker({ showOn: 'both', dateFormat: 'dd/mm/yy', buttonImage: '/images/calendar-icon.png', buttonImageOnly: true }); } }, searchoptions: { sopt: ['eq', 'ne', 'lt', 'le', 'gt', 'ge', 'nu', 'nn'], dataInit: function(element) { $(element).datepicker({ showOn: 'both', dateFormat: 'dd/mm/yy', buttonImage: '/images/calendar-icon.png', buttonImageOnly: true }); } } } And when I'm searching and select th

Categories : Jquery

How to disable a datepicker control in C# /Asp.Net?
Is that a Custom Control? If so, you need to add a public property in it's code behind that will get or set the readonly property of the textbox of your calendar. public bool ReadOnly { get { return WatermarkExtender1.ReadOnly; } set { WatermarkExtender1.ReadOnly = value; } } Then you can set it like dtSupBookedFromDate.ReadOnly = true;

Categories : C#

Combobox style DatePicker control alternative
You should make your Custom Control like this... <UserControl x:Class="WpfApplication2.ucCalender" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="50" d:DesignWidth="301"> <Grid Height="48" Width="303"> <Grid.ColumnDefinitions> <ColumnDefinition Width="100*" /> <ColumnDefinition Width="100*" /> <ColumnDefinition Width="100*" /> </Grid.ColumnDefinitions> <ComboBox Height="30" HorizontalAlignment="Left" Margin="2,2,2,2"

Categories : Wpf

Datepicker control does not fire after postpack in update panel
You have to unbind/bind your datepicker to your TextBox every time the page (re-)loads. I don't know how your timepicker works, but with jQueryUI's you can use something like that (js): function pageLoad() { $("#myTextBox").unbind(); $("#myTextBox").datepicker(); } Your textbox should use ClientIDMode="Static" for that.

Categories : Asp Net

Popup multiple Datepicker at a same time on single control in mvc
can you please check this link where you can popup datepicker with textbox id http://keith-wood.name/datepick.html http://jqueryui.com/datepicker/

Categories : Jquery

jqgrid and datepicker control giving error for new records
I think that the reason of the problem which you described is wrong parameters of jQuery UI Datepicker which you use. You use formatter and formatoptions parameters of datepicker which not exists. Instead of that you should use dateFormat option which format described here. UPDATED: The main reason of the problem which you describe is wrong date format which you use. It's important to understand that srcformat and newformat of formatoptions should have PHP date format, but jQuery UI Datepicker supports another format which described here for example. The input data 11/1/2013 12:00:00 AM contains both date and time. On the other side jQuery UI Datepicker support date only. Because you use newformat: 'yy-M-d' then I suppose that you want just ignore the time part of the date. In the case I

Categories : Jquery

Calling Android DatePicker constructor when adding a DatePicker widget dynamically to the layout throws exception
I think the problem is, that the DatePicker isn't a single Widget but a bunch of them. And according to the documentation they are always used within Dialogs, e.g. DatePickerDialog. So I suggest you create a button dynamically and add an on-click callback that opens a DatePickerDialog.

Categories : Android

Knockoutjs and JQuery datepicker. Element looses datepicker after re-render
The best idea is to consider using a custom binding like the one in this answer: knockoutjs databind with jquery-ui datepicker or this answer: Knockout with Jquery UI datepicker. If you don't need the two-way data-binding, then a minimal custom binding would be simply: ko.bindingHandlers.datepicker = { init: function(element) { $(element).datepicker(); //handle disposal (if KO removes by the template binding) ko.utils.domNodeDisposal.addDisposeCallback(element, function () { $(element).datepicker("destroy"); }); } };

Categories : Knockout Js

Knockout change while jQuery Datepicker is open breaks Datepicker
Note: This answer isn't complete. However, as it's too large for a comment and probably helpful (towards a solution) anyhow I've taken the liberty and posted it as an answer. Anyone that can complete this answer is invited to do so through an edit or by spinning off into another better answer. The thing that seems to be spoiling the party (taken from the documentation, emphasis mine): This will be called once when the binding is first applied to an element, and again whenever the associated observable changes value. If I hackisly prevent the update from doing its datepicker calls in the first update the datepicker won't break anymore (other issues do arise though). For the init I've added this line at the end: element.isFirstRun = true; Then the update method will do the follow

Categories : Javascript

bootstrap datepicker orientation syntax for placement of the datepicker
Bootstrap datapicker plugin just support left orientation. You can check the original code here. However, it has some smartness to keep it in view. All you can use is: $("#dp3").datepicker({ orientation: 'left' }); orientation as right, top are not supported.

Categories : Twitter

JQuery UI / Datepicker : How to initialize datepicker with an empty year?
I thought a little bit and I think what I would do is not possible... How could the datpicker calculate the days of the month if the year is not specified? So, Have you got any suggestions to force my users to change the year default value ?

Categories : Jquery

jquery datepicker max date min date control using two date picker
Please try the below: <script type = "text/javascript"> $(function () { $("#from").datepicker({ onSelect: function (date) { $("#to").datepicker("option","minDate", date); $("#to").datepicker("option","maxDate", new Date()); }, maxDate: 0 }); }); </script>

Categories : Asp Net

using twitter datepicker.css and bootstrap-datepicker.js
red one, It would be helpful to share a jsFiddle of your code. At least let us know what scripts you are loading and styles you are loading and in which order. Since the datepicker is dependent on jQuery you need to make sure that jQuery is loading before your .js files. You asked about the bootstrap-responsive and bootstrap files. As long as you are linking to the correct one it should work. Hopefully that gives you a little direction. Will update when you share more information.

Categories : Twitter

Datepicker and TimePicker in a form, datepicker works fine but timePicker doesn't drop down in field
Based on your comment above, I would guess your code is not executing because you have not included jquery.timePicker.js in your code. Download the file and include it like this: <script src="path/to/your/js/file/jquery.timePicker.js"></script> You don't need to include datePicker.js because datepicker is a plugin included with the jquery-ui library. (So really you do have datepicker included!) Also, looking at your comment, you do not need to have a ; after declaring a <script> tag Like this: <script></script> Not like this: <script></script>; EDIT I found the issue, it appears the jquery.timepicker.js library is quite old (2009). It was developed with a much older jquery version. When I run jquery.timepicker.js with a newer version of

Categories : Jquery

how to add picture box control and label control dynamically in list view control
Did you google around? There are lot of links that can help you http://geekswithblogs.net/dotNETvinz/archive/2009/04/24/faq-displaying-image-from-database-to-gridview-control.aspx http://weblogs.asp.net/aghausman/archive/2009/05/26/show-images-on-grid-view-from-file-stream.aspx http://www.codeproject.com/Articles/20782/Displaying-Images-from-a-Database-in-a-GridView http://www.codeproject.com/Articles/20971/Thumbnail-Images-in-GridView-using-C

Categories : Asp Net

User modernizr to force browser to use jQuery UI datepicker instead of browser datepicker?
Instead of using date type inputs, just use text inputs. Since you don't care about date input support, you no longer need the Modernizr test. You may need to give them all the same class so that you can select them to initialize the date picker widget: HTML <input type="text" class="date"/> jQuery $('input.date').datepicker(); Working Demo

Categories : Javascript

Set the min date of Telerik Datepicker on onChange event of another Telerik datepicker in javascript
take a look at the following demo: http://demos.telerik.com/aspnet-mvc/datepicker/clientsideapi There is button which says "Set Min Date". so this will set Min date of another date picker. Basically the controls have a rich client side API. so you need to use the right methods to work with the controls from client side. So here is the JavaScript code to set Min Date on a date picker control: function getDatePicker() { var datePicker = $('#DatePicker').data("tDatePicker"); return datePicker; } function minDatePicker() { var value = $('#DatePickerMinOrMax').data("tDatePicker").value(); getDatePicker().min(value); } In the above code - DatePicker is the main control on which I want to set a min date. DatePickerMinorMax

Categories : C#

How to show month in one datepicker based on the selection of month in another datepicker
Below is the snippet for above requirement...... <head> <title>Testing</title> <link href="css/jquery-ui-start-custom-1.10.3.css" rel="stylesheet" type="text/css" /> <style type="text/css"> .ui-datepicker-next, .ui-datepicker-prev { display: none; } </style> <script src="scripts/jquery-1.10.1.min.js" type="text/javascript"></script> <script src="scripts/jquery-ui-custom-1.10.3.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $('.ui-datepicker-prev ui-corner-all').hide(); $("#datepicker").datepicker({ changeMonth: true, changeYear: true, yearRange: "-0:c+1

Categories : Javascript

How to add an html control inside a div or crate a new control beside another control
var myA=document.createElement("a"); would create an element, you can set it's text by myA.innerHTML and src with myA.src="http://www.google.com" To add it to the page you can do: document.getElmentById("mydiv").appendChild(myA); to remove: var As=document.getElmentById("mydiv").getElementsByTagName("a"); var a = As[As.length-1]; a.parentElement.removeChild(a);

Categories : Javascript

mootools datepicker set value from other datepicker
That version of DatePicker uses hided inputs. So what you see is not what your input has as value, it has a unix datestamp. If you noticed the Date.parse($('arrival_date').value); was in the 70's, that's because javascript uses miliseconds and unix time is in seconds. To get the "real" day from the $('arrival_date').value you need to multiply by 1000. But you actually dont need that. To make the second DatePicker get the day from the first you can use this: onSelect: function (){ var depDate = $('departure_date'); if (depDate.value == ""){ depDate.value = $('arrival_date').value + 86400; } } This will add one day to the first datepicker date if the second is empty. The thing is that you will not see the change until the you open the datepicker, so if you change th

Categories : Javascript

How to get all options of jquery datepicker to instanciate new datepicker with same options?
You can get the options of the existing datepicker using this: var options = jquery('#datepicker').datepicker('option', 'all'); to get one specific option, for example the numberOfMonths: var numberOfMonths = jquery('#datepicker').datepicker('option', 'numberOfMonths');

Categories : Javascript

Jquery datepicker and Spring Locale. Change datepicker language with locale language. How to?
I used this code snippet in a project once. Hope it helps: $(function() { calendar(); }); function calendar(){ //omitted datepicker init $(".calendar").datepicker("option", $.datepicker.regional["<%=locale%>"]); } All date field's css attributes are specified as calender and locale is retrieve in java code. I'm not familiar with CookieLocaleResolver, I used SessionLocalResolver but there should be equivalent way to get the Locale. public static Locale getLocaleFrom(HttpSession session) { return (Locale) session .getAttribute(SessionLocaleResolver.LOCALE_SESSION_ATTRIBUTE_NAME); } And I remember we modified the datepicker for different locale values between Java and datepicker. You could use a mapping mechanism as an alternative solution.

Categories : Javascript

How can I use wildcards or regular expressions to control Path-based authorization / access control for svn?
as of June 2013 it is impossible to do this. So, the solution to the problem is to re-organize the repository so this isn't necessary. When a thing is too difficult it usually leads to a large rethink of the design or approach. At present maven structure leads to this requirement: root/pom.xml root/project1/pom.xml root/project2/pom.xml etc.. We can replace this with /root/pom.xml /project1/pom.xml /project2/pom.xml etc.. We can set the svn perms as follows granting all read access to the top level project and read write to their project. If an continuous integration build server populates an internal maven repo with the root snapshot then the users only need to checkout specific projects. [repo:/root] * = r @releng = rw [repo:/project1] @teamOne = rw [repo:/project2] @teamTwo =

Categories : Svn

adding Control to form but gap keeps doubling when added at Bottom of previous control
this is more of a hack but it works. sharpUserX.Size = sharpUserSize PnlSharpUsers.Controls.Add(sharpUserX) sharpUserX.Location = pnlAddBtn.Location if i set the size before i add the control, then set the location after it seems to apply the font scaling to the size, but not the location, which works perfectly for me.

Categories : C#

Button sizes changing on user control when control is added to window
You have don't have your LastChildFill property set to False on your top DockPanel. This is the reason "Ent" is changing size and moving your screen. You also have the HorizontalAlignment on "Del" set to stretch. Try setting that to Left, but might be moot with the LastChildFill correction. The overall resizing is do to HorizontalAlignment set to Stretch set that to Left.

Categories : Wpf

how to restrict child control inside Parent control in Winform application?
if you add the label to the panel dynamically then you must do: this.panel1.Controls.Add(this.button1); if you don't, that the mistake. On top of that, when you move the label, make sure that the new values are inside the range of the panel, using panel1.Location.X panel1.Location.Y and share your code for more help if needed

Categories : C#

Border doesn't inherit Control, so how does a setter on Control.Background work?
Background dependency property in WPF is shared by many classes. It is defined in the Panel class, other classes just call AddOwner on it. Border.cs [CommonDependencyProperty] public static readonly DependencyProperty BackgroundProperty = Panel.BackgroundProperty.AddOwner( typeof (Border), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.SubPropertiesDoNotAffectRender)); Panel.cs [CommonDependencyProperty] public static readonly DependencyProperty BackgroundProperty = DependencyProperty.Register("Background", typeof(Brush), typeof(Panel), new FrameworkPropertyMetadata((Brush)null, FrameworkPropertyMetadataOptions.AffectsRender |

Categories : Wpf

Tap event on dynamically added custom control is handled by another control of same type
I figured out the problem, and I am chocking it up to lack of experience with WPF. When I made my Waypoints I created them like to var newWaypoint = new Waypoint(waypointNumber, latitude, longitude); newWaypoint.Name = "wayPoint" + waypointNumber; newWaypoint.Opacity = 100; double leftMargin = CalculateLeftMargin(longitude); double topMargin = CalculateTopMargin(latitude); newWaypoint.Margin = new Thickness(leftMargin, topMargin, 0, 0); LayoutRoot.Children.Add(newWaypoint); The problem with that was that I was setting the Margin of the control. When I set the Margin it was actually stretching out my Waypoint so I was having Waypoints on top of Waypoints. After some research I came across this article Changing Position of an Element Programmatically in WPF which showed me how to prope

Categories : C#

Update parent control when the child control is manually removed in the designer
To wrap it up, I found a solution to my problem. Like a TabControl, my ButtonList contains two collections: ControlCollection inherited from the Control class ButtonListItemCollection (TabControl has TabPageCollection) Adding ButtonListItems is done via the collection editor in the properties. Removing can be done either in the collection editor or just by selecting the ButtonListItem in the designer and pressing the DEL button on the keyboard (manual deletion). When using the collection editor, ButtonListItems are added/removed to/from the ButtonListItemCollection and then to/from the ControlCollection. However, when a ButtonListItem is manually deleted it is only deleted from the ControlCollection not from the ButtonListItemCollection. So what needs to be done is to detect when the

Categories : C#

jump to search result in a repeat control with a pager control in a xpages
A few pointers that might help you to go ahead: stop paging in repeats. The extlib has a nice sample of "show more", so instead of showing 1-20, 21-40 etc. you show until the record you found (might not work for large datasets) Open the search page with URL parameters that indicate the position number of the document (e.g. 498). Then use that parameter to let the repeat control figure out the starting position (which depends on the number of documents the repeat is configured for (default is 30, but you don't know). Just make sure not to use the passed parameter unchecked. you can add <a name="[unid]"> (or id=) tags to the repeat and then [directly navigate] (http://reference.sitepoint.com/html/a) to them ....nsf/searchResults.xsp#unid?moreParameters Let us know how it goes

Categories : Misc

Black lines when adding custom control to a panel with Control's DockStyle set to Top
Finally I found the solution to my problem. I was setting the Comment control's AutoSize property to true. When I set it false, it worked. Thanks @Sayse, your comment gave me hint about it.

Categories : C#

ms-access 2007 form datetime control : if control length smaller than the size of the value it shows ###
Access doesn't behave like this. You can either increase the width of the control (the best solution) specify a shorter Format for the date reduce the font size An odd approach would be to add a label which obscures some of the date-control, but such that you can still see part of the date in the background. You might consider using an event such as Focus to change the Format of the control, but this won't work as the Format only applies when you move away from the control. You could, I suppose, use two controls; one for display and one for editing.

Categories : Forms

I can not display binding value of a custom control's property when control loads
Try binding SelectedItem property to ControlTemplate <ScrollViewer x:Name="PART_ContentHost" Content={TemplateBinding SelectedItem} SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Stretch"/>

Categories : Dotnet

FlowLayout Control With User Control Item Template Not Binding
Try: public UserControl2() { InitializeComponent(); Loaded += (sender, args) => { var obj = (ViewMod)this.DataContext; if (obj == null || obj.Prop == null) return; var d = obj.Prop; if (d == null) return; grd2.Children.Add(new TextBlock { Text = d.Name }); }; } DataContext is not set instantly. Hence we use the Loaded event and add a lambda to it to do your corresponding steps. side-note: even-though this works, please do search and look at some MVVM examples. While having no code-behind is not really an MVVM requirement, I think your taking it a bit too far adding Grid children and stuff from code-behind when you can do it perfectly fine from xaml.

Categories : C#

How to make binding from user control to property of parent control?
ElementName binding works within in same XAML scope. This will work - <Grid> <CheckBox Name="checkBox1"/> <Label Content="{Binding ElementName=checkBox1, Path=Name}"/> </Grid> But if you want to do it in different UserControl, you have to tweak a bit your code and use Tag to hold name - <Grid> <CheckBox Name="checkBox1"> <local:UserControl1 Tag="{Binding ElementName=checkBox1, Path=Name}"/> </CheckBox> </Grid> UserControl.xaml <Canvas> <Label Content="{Binding Path=Tag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}"/> </Canvas> On a sidenote, in your UserControl, you know you need to bind with ElementName = checkBox1 and that's

Categories : Wpf

Custom Control: Scripts not loaded when control is hidden on pageload
I had a very similar problem earlier and came across your question. I was loading javascript for my custom control by overriding the OnPreRender method. protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); Page.ClientScript.RegisterClientScriptInclude("MyJavascript", "MyURL"); } This had worked when using the control in a normal page environment, but in this case I was using it inside an update panel and initially hiding it. Ajax post backs from the update panel would then update the Visible property to true. At this point of course ASP.NET has no opportunity to automatically inject the client script into the <head> of the page. The solution Instead of overriding OnPreRender you can override OnInit (which should always fire even when t

Categories : C#

Find radio button control in nested repeater control in asp.net?
I found the answer. Thanks foreach (RepeaterItem repeater in TabRepeater.Items) { Repeater repeater1 = (Repeater)repeater.FindControl("ContentRepeater"); foreach (RepeaterItem repItem in repeater1.Items) { for (int i = 1; i <= 4; i++) { string rdboption = ds.Tables[0].Rows[c][0].ToString() + "_" + ds.Tables[0].Rows[i - 1][2].ToString() + "_" + "Option" + i + "_" + i; PlaceHolder PlPreview = (PlaceHolder)repItem.FindControl("PlPreview"); rbt = (RadioButton)PlPreview.FindControl(rdboption); if (rbt.Checked) { // statement } } }

Categories : Asp Net

How can I bind a parent control's TextBox from inside a user control
You can declare the DataContext property of the <TextBlockControl /> as the Text property of the "editor" <TextBox />: <wpfSandbox:TextBlockControl DataContext="{Binding Text, ElementName=editor}" /> and inside your control: <Grid> <TextBlock Text="{Binding}" /> </Grid>

Categories : Wpf

dynamically created wpf control doesn't work the same as the control it is based on
You aren't setting IsHiteTestVisible = false on your Rectangle. That is the problem, because your ContentPresenter is on top of the MoveThumb in your template. I'm not sure what the MoveThumb looks like, but if it is just a transparent rectangle, I'd put that on top of the ContentPresenter so you don't have to worry about setting IsHitTestVisible on all the children you add.

Categories : Wpf

Custom control events don't fire when control collection is cached?
The reason this doesn't work is because the controls must be recreated on the post back, and events wired up, for them to fire. See, since the server is stateless, to fire an event on an object, that object needs recreated AND readded to the form. How about cache the database result instead and continue the loop otherwise to build new, add, and hookup the controls?

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.