class Post(models.Model):
ref_no = models.CharField(max_length=6, null=True, blank=True, unique=True)
select_section = models.CharField(max_length=20, choices=Sections)
incident = models.TextField(max_length=500, help_text="Mention the incident in brief here.")
severity = models.CharField(max_length=20, choices=Severity)
date_posted = models.DateField(auto_now_add=True, auto_now=False, blank=True)
confirm_closing = models.BooleanField(default=False, help_text="Please confirm to close the Ticket")
comment = models.TextField(max_length=500, default="Issue resolved and this Ticket has been closed successfully!")
date_closed = models.DateField(null=True, blank=False, auto_now_add=False, auto_now=False)
username = models.ForeignKey(User, on_delete=models.CASCADE)
This is my model Here i want my min_date for date_closed field should be greater than the date_posted field of my model....please let me know what to do.....thanks in advance
I suggest doing something like this:
Here we set
minDate
when change the the datepicker.