1

I have a attribute call meeting time which is type DateTime.

model looks like this,

[Display(Name = "Meeting Time")]
public DateTime MeetingTime { get; set; }

view look like this

<div class="form-group mt-3">
     <label asp-for="MeetingTime"></label>
     <input asp-for="MeetingTime" id="MeetingTime" name="MeetingTime" class="form-control" onchange="validateMeetingDate()" />
     <span asp-validation-for="MeetingTime" class="text-danger"></span>
     <label id="dateError" style="display:none; color:#c90a14;">Start time is earlier than the current time</label>
</div>

in chrome it renders correctly, allowing user to pick date and the time. On Firefox its not showing the date-time picker.

Chrome view

On Firefox its render like this.

Firefox view

Date-picker of this example not working in Firefox. I am having the exact same issue. link

14
  • @MattJohnson-Pint thank you for the advice, I added the front end code as well. Commented Jun 15, 2020 at 17:12
  • @Brutus You haven't actually. Please show the HTML for the <input> tag that the browser receives. Commented Jun 15, 2020 at 17:13
  • Thanks for adding your server-side HTML, but it's still unclear what is rendering on the client-side. The CSS class you show looks like perhaps it's from Bootstrap or some other library? If so, please recognize the problem is purely client-side, so C# is not relevant. You'll need to tell us what libraries you're using to render the datepicker, including versions. Commented Jun 15, 2020 at 17:17
  • 1
    @MattJohnson-Pint, I am not using any client side library to render the date-piker. Its from asp .net mvc. Commented Jun 15, 2020 at 17:19
  • 1
    @MattJohnson-Pint stackoverflow.com/a/51041551/11683? Commented Jun 15, 2020 at 18:10

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.