Results 1 to 4 of 4
  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2011

    DatePicker messing up!

    Hey there,

    I'm having issues with the DatePicker control. It's driven me nuts, so maybe y'all have seen this before and can help me out.

    So here's the problem: No matter what date I pick, it always returns today's date! Here's the code below, and a screenshot (for the non-believers!),
    Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles cmdOK.Click
    End Sub
    I'm stumped! Please help me out,

    Kevin McKowski
    Attached Images Attached Images  

  2. #2
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009

    Re: DatePicker messing up!

    The WPF forum is over here. I will ask a mod to move it for you as this question directly relates a specific WPF control and not a control from Windows Forms.

  3. #3
    You don't want to know.
    Join Date
    Aug 2010

    Re: DatePicker messing up!

    DisplayDate is a confusing property... I think it's for situations where you want to preserve the user's selection but possibly display another date? Either way, its default value is Today (per documentation) and it isn't what you want. Use the SelectedDate property instead. This is spelled out clearly in the example in the documentation.

  4. #4
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Searching for mendhak

    Re: DatePicker messing up!

    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.