Link to home
Start Free TrialLog in
Avatar of mgmhicks
mgmhicks

asked on

Urgent, problem with updating parameter from datepicker control

I have a datepicker which is bound to a dataset.  When I do a add to the dataset with this bound control, the parameter information which is bound to dataset, is null unless I go and click on the datepicker and change the date.  Then the parameter has correct information.  The datapicker is defaulting to todays date, but even though its bound the parameter is not getting the default text.  I do have it bound to the text property.  
Avatar of kerryw60
kerryw60

For what it's worth, I use the DatePicker with a textbox, shink the datepicker down in size to just the dropdown arrow and butt it up against a textbox, when the user selects a date (datepicker_ValueChanged)

txtMyDate.Text = dtDatePicker.Text.ToString()

I never bind controls, but you should be able to bind your textbox to your date and on load of your form set to system date.

Good Luck!
I may not have been clear enough, so I'll elaborate: I put the textbox and datepicker together so they look like one control to the user, but in placing the date in the textbox, it's just easier (to me) to manipulate it further as necessary as much of what I do is based on dates.

Hope that helps...
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial