1

I have a datepicker control used with a textbox to show calendar dates.

 @Html.TextBoxFor(x => x.CheckDate, new
                                    {
                                        @class = "text_dropdown_corner text-forty-seven-percent",
                                        data_datepicker = "true",
                                        size = 11,
                                        data_min_date = DateTime.Today
                                    })

In js file , i read this value as :

dateFormat(this.metaData.getDateElementValue().val(), "mm/dd/yyyy HH:MM:ss")

data_min_date is used since dates are to be restricted in the calendar. dateFormat is used since i send this date as json to the controller.

Even if no value is selected for calendar control , the dateFormat returns value as DateTime.Today. If no value is selected, i need to show null or empty value as date. Any solution for this?

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.