Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set Maximum and Minimum dates? #7

Open
SatyaRamprasad opened this issue Mar 21, 2018 · 1 comment
Open

How to set Maximum and Minimum dates? #7

SatyaRamprasad opened this issue Mar 21, 2018 · 1 comment

Comments

@SatyaRamprasad
Copy link

No description provided.

@oscarjaergren
Copy link

Add this to the method below

private void ShowDatePicker()
{
CreateDatePickerDialog(this.Element.Date.Year, this.Element.Date.Month - 1, this.Element.Date.Day);

        Calendar cal = new GregorianCalendar();
        cal.Set(Element.MaximumDate.Year, Element.MaximumDate.Month, Element.MaximumDate.Day);

        Date dateRepresentation = cal.Time;

        _dialog.DatePicker.MaxDate = dateRepresentation.Time;

        _dialog.Show();
    }

I.e only important is the _dialog.DatePicker.MaxDate BUT it won't work unless the date is in java date time

Do same for DatePicker.MinDate and it will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants