I made a model-driven form in angular 2, and one of the input fields (it's basically a month let jan) must show up only if a dropdown above is selected particular which basically a <option>. My question is how can I set that input required only if the option value is Calendar? And also i want that max value cann't greater than 31 as it's month field.
<option value="business">Business Days</option> <option value="calendar">Calendar Days</option> [image: Inline image 1] On Thu, Dec 15, 2016 at 2:48 PM, Sander Elias <[email protected]> wrote: > Hi Aec, > > You mean something like: > <form > > Number<input type="text" name="number" pattern="[0-3]?[0-9]" title="a > day between 1 and 31"> > <input type="submit"> > </form> > > > ?? > > Regards > Sander > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Angular" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/angular/aXposLnawjE/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Angular" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
