I have one textbox in asp.net application. I have used MaskedEditExtender and CalendarExtender. I use the date format yyyy-mm-dd. When i type the date in textbox the typed date displayed in the textbox. But when i select date from calender the date is not displayed in the textbox. Only the masked format "_--_" is displayed. Can anyone able to help me to solve the problem. Thank you..
Make sure your CalendarExtender has the runat="server", Format="yyyy-mm-dd" and TargetControlID="YourTextBox" properties set.
Have you considered using JQuery? It has a lovely Calendar control (datePicker) which is part of the JQuery.UI library. Much more useful than the ASP.AjaxToolkit stuff!
Related
I have a Visual WebPart where I am using SharePoint calendar control. I have a requirement to disable specific date in calendar which user can't select. I have tried many ways but no luck. Can anyone help me please.
<SharePoint:DateTimeControl ID="dtDateTimeControl" runat="server" DateOnly="true" />
I have list of dates in a array which I want to disable in the calendar .
20/08/2020
21/08/2020
22/08/2020
23/08/2020
24/08/2020
SharePoint calendar control does not provide a OOB way to achieve this.
DateTimeControl Properties for your reference:
https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ms415699(v=office.14)
You could try to use JQuery DatePicker plugin to achieve your requirement.
Demo:Jquery UI datepicker. Disable array of Dates
Similar issue:
https://social.msdn.microsoft.com/Forums/office/en-US/1194e097-12c9-42a7-9ece-ff40fd81129a/sharepoint-calender-date-disable?forum=sharepointdevelopmentprevious
Now, I am working with asp.net , C# and I have made custom controls . In my custom controls especially in Date control, I want to select only month and day part in OnFocus Event.
Right Now, I have wrote
control.select();
then , as usual, the text of the control(2012/08/04) will be selected.
But now I want to give selection only on the part of the month and day(08/04). I am searching many ways to do it. But I haven't got any ways until now. So I would like to know that Can I give a selection on only month and day part(08/24) of a Date Control.
With regards
I have a text box in my content page of asp.net webapplication. I masked the text box with maskededitextender with date format dd/MM/yyyy. I use custom validator to validate the text box. While entering wrong date format in text box like MM/dd/yyyy(12/23/2011) it will throw validation message "Incorrect date format". During this time it disables all other links in Master page.
How to overcome this problem. Can anyone help me with this?
Thanks.,
First of all tell us that how are you validating the maskededitextender..
If your page will not pass validation then you can not post back the
page or in other words all links on the page will be disabled/ fail to
create post back.
Check this SO thread for validation setttings:
how to validate MaskedEditExtender control for MM/dd/yyyy format?
I have history window with date picker but there’s some days without any record in DataBase, I want to disable this days in the datepicker.
Any ideas please.
Thank you
You can use the DayRender event handler for disabling the dates in the datepicker. Refer this sample site to know.
Have a look at the DatePicker.BlackoutDates Property. Dates in this collection will appear as disabled on the drop-down calendar.
I am creating a web application in which i have to select a date. I am using Calendar control. But it occupies too much space and other labels and text boxes are not shown in proper alignment. Is there anything I Can do in which when i click on an image, the calendar control opens, but on the textbox, so that it does not occupy any space.
Regards,
Jigar
One possible solution is to use a purely client side date picker, which displays a "pop-in" calendar when the TextBox is selected. Search the web for "date picker" to find tons of JavaScript implementations, including the jQuery UI Datepicker.