52 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| @using BlazorWebAssemblyVisaApiClient.Infrastructure.Services.DateTimeProvider
 | |
| @using VisaApiClient
 | |
| <div>
 | |
|     <div >
 | |
|         <label>
 | |
|             Passport number:<br/>
 | |
|             <InputText DisplayName="Passport number" class="rounded" @bind-Value="Passport.Number"/>
 | |
|         </label><br/>
 | |
|         <ValidationMessage For="() => Passport.Number"></ValidationMessage>
 | |
|     </div><br/>
 | |
| 
 | |
|     <div >
 | |
|         <label>
 | |
|             Issuer:<br/>
 | |
|             <InputText class="rounded" @bind-Value="Passport.Issuer"/>
 | |
|         </label><br/>
 | |
|         <ValidationMessage For="() => Passport.Issuer"></ValidationMessage>
 | |
|     </div><br/>
 | |
| 
 | |
|     <div >
 | |
|         <label>
 | |
|             Issue date:<br/>
 | |
|             <InputDate DisplayName="Issue date" class="rounded" @bind-Value="Passport.IssueDate" max="@formattedDate"/>
 | |
|         </label><br/>
 | |
|         <ValidationMessage For="() => Passport.IssueDate"></ValidationMessage>
 | |
|     </div><br/>
 | |
| 
 | |
|     <div >
 | |
|         <label>
 | |
|             Expiration date:<br/>
 | |
|             <InputDate DisplayName="Expiration date" class="rounded" @bind-Value="Passport.ExpirationDate" min="@formattedDate"/>
 | |
|         </label><br/>
 | |
|         <ValidationMessage For="() => Passport.ExpirationDate"></ValidationMessage>
 | |
|     </div>
 | |
| </div>
 | |
| 
 | |
| @code {
 | |
|     private string formattedDate = null!;
 | |
| 
 | |
|     [Parameter, EditorRequired] public PassportModel Passport { get; set; } = null!;
 | |
| 
 | |
|     [Inject] IDateTimeProvider DateTimeProvider { get; set; } = null!;
 | |
| 
 | |
|     protected override void OnInitialized()
 | |
|     {
 | |
|         Passport.IssueDate = DateTime.Now;
 | |
|         Passport.ExpirationDate = DateTime.Now;
 | |
|         formattedDate = DateTimeProvider.FormattedNow();
 | |
|     }
 | |
| 
 | |
| }
 |