Z
Z
z_a_p_a_r_a2018-12-21 15:55:20
JavaScript
z_a_p_a_r_a, 2018-12-21 15:55:20

Creating a data filter by date?

And so I have a project on ASP.Net core MVC 2.1.
And there is the following model:

public class Duty
    {
        public int DutyId { get; set; }
        public DateTime Date { get; set; }
        public List<DutyOfPerson> DutyPerson { get; set; }
    }

VS generated controllers and views. For the Date property, HTML is generated:
<div class="form-group">
  <label class="control-label" for="Birthday">День рождения</label>
  <input class="form-control" type="date" data-val="true"  id="Birthday" name="Birthday" value="">
  <span class="text-danger field-validation-valid" data-valmsg-for="Birthday" data-valmsg-replace="true"></span>
</div>

Everything works well. But now there is a need to display not all duty records, but only for a specific month. That is, you need to create a datepicker in which the choice is the month and year. As I understand the above datepicker is just an input element made in HTML5 and there is no way to set the date format. Which exit? Any ideas?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
z_a_p_a_r_a, 2018-12-24
@z_a_p_a_r_a

I decided with the help of air-datepicker , at first I wanted to install / bootstrap-datepicker but Libman didn’t want to download it for some reason

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question