473,748 Members | 4,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Input mask on a text box?

Is it possible to create a input mask on a text box?

If a user enters a date like this 060103 I would like to see it
automatically converted to 06/01/03. In Access if you set a input mask to
99/99/00;0; when the cursor enters the cell you see __/__/__ . That is the
functionality I am trying to accomplish.

Can it be done?
Nov 18 '05 #1
4 7973
Not out of the box with ASP.NET. You have to use client-
side script to achieve this functionality or use a third-
party control.

Tu-Thach
-----Original Message-----
Is it possible to create a input mask on a text box?

If a user enters a date like this 060103 I would like to see itautomaticall y converted to 06/01/03. In Access if you set a input mask to99/99/00;0; when the cursor enters the cell you see __/__/__ . That is thefunctionalit y I am trying to accomplish.

Can it be done?
.

Nov 18 '05 #2
Jos
Russ wrote:
Is it possible to create a input mask on a text box?

If a user enters a date like this 060103 I would like to see it
automatically converted to 06/01/03. In Access if you set a input
mask to 99/99/00;0; when the cursor enters the cell you see __/__/__
. That is the functionality I am trying to accomplish.

Can it be done?


Set the Text property of the text box to "__/__/__"
Add a RegularExpressi onValidator to the form to get
validation. Use the expression "\d{1,2}/(\d{1,2}/\d{4}|\d{2})"
The automatic conversion is not readily available, though.
You'll have to add your own code for that.

--

Jos Branders
Nov 18 '05 #3
I did some looking around and found a great component from a company called
Assisted Solutions. It has everything I was looking for and more.

Here is the URL if anyone else needs something like this:

http://www.assistedsolutions.com

Click on Web Components and you will find it there.

Kudos to them for making this a free download!
Nov 18 '05 #4
My product, Peter's Date Package, includes a DateTextBox that specifically
reformats dates, including adding the slashes when omitted. (It has numerous
other features including a popup calendar.) Details are at
http://www.peterblum.com/datecontrols/home.aspx.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com

"Russ" <ru**@NOSPAMaco rdiamn.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Is it possible to create a input mask on a text box?

If a user enters a date like this 060103 I would like to see it
automatically converted to 06/01/03. In Access if you set a input mask to
99/99/00;0; when the cursor enters the cell you see __/__/__ . That is the functionality I am trying to accomplish.

Can it be done?

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
12709
by: dude | last post by:
hello how would i make an input mask that only makes the first letter a capitol one? i've been playing around and testing various masks, also tried the wizard, but i've had no luck. could anyone help, many thanks in advance.
1
6350
by: Miranda Evans | last post by:
In my application, a text box control resides in a form. The text box control is unbound, but--assuming all edits are passed when the user click a command button on the form--the contents of the text box control end up in a field in a table with a data type of Date/Time. Is it possible to set up a mask on this text box control such that if one types any any of the following sequence of characters into the text box 06/25/04 6/25/04
9
2959
by: Paul | last post by:
hi, is there an input mask i could use on a report to do the following: (1) if i enter "THISISATEST" on my form, i want the text box on my report to display: "T H I S I S A T E S T". (2) if i enter "THIS IS A TEST" on my form, i want the text box on my report to display: "T H I S I S A T E S T".
3
3332
by: AA Arens | last post by:
When I want the first character of a field to be Uppercased, I need to make an input mask, like >L< followed by ??????? for example. But this mask creates ____ in an unfilled field, which I don't like. How to get the fist character uppercased without an input mask or without ____ (underscores). When I click with the mouse on an empty field, it won't go to the far left side, cause of the input mask. How to avoid it? Bart
6
6000
by: Regnab | last post by:
Morning All, I'm trying to ensure that when the user enters a number on a form, the database automatically leaves a space after the 3rd number. I've tried to do this using input masks, but when I tab to the text box, the ___ _____ shows up and I can't enter anything at all. Cheers Reg
2
2006
by: BerkshireGuy | last post by:
Is there a way to display what the expected format is before entering a control. For instance, if I have the input mask of 99/99/0000;0;#, it shows me ##/##/##, but only when I type the first character. Is there a way to have that display before I type anything?
5
8163
by: Vincent van Beveren | last post by:
Hi everyone, I have a page with a login box. Because of lack of space, instead of labels I put the descriptive text in the input fields (so username input says 'username', and password input says 'password'). The password field however, once it does have the focus, it should mask its input. Now what I've done, and works in firefox, is onfocus="this.type='password'; this.value='';". (Its a bit more complex than that, but this is...
5
3641
by: mtgrizzly52 | last post by:
First thing, because of you all and this web site, I am building a first class time saving database for my fellow workers to use. My really dumb questions is this. I have a control in a subform that is in the second position in terms of all the controls in the form. When entering the subform via a toggle button, the focus is set on the first control which is locomotiveID. (By the way, the subform is a datasheet type of subform) The...
1
12243
by: Doug | last post by:
Hi, I created a short date field. The format is dd/mm/yyyy when displayed. The input mask is set to 99/99/00;0 (default, I didn't type anything). If I edit an existing date, say change 12/14/2007 to 12/15/2007, I get an error "the value you entered isn't appropriate for the input mask." I have to delete the "20" in the year to get it accepted, and then it puts the 20 right back. (I have the field set to required.) I changed 99/99/00;0...
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8239
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2211
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.