-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1849 from riganti/datetimeonly-translations
js translations: TimeOnly, DateOnly and DateTime.Now
- Loading branch information
Showing
9 changed files
with
201 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/Samples/Common/Views/FeatureSamples/JavascriptTranslation/DateOnlyTranslations.dothtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@viewModel DotVVM.Samples.Common.ViewModels.FeatureSamples.JavascriptTranslation.DateTimeTranslationsViewModel, DotVVM.Samples.Common | ||
@import System | ||
|
||
<!DOCTYPE html> | ||
|
||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title></title> | ||
<style> | ||
*[data-ui] { | ||
font-weight: bold; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<h1>DateOnly testing</h1> | ||
|
||
<dot:TextBox data-ui="textbox" Text="{value: NullableDateTimeProp}" /> | ||
<dot:Button Text="now" Click="{staticCommand: NullableDateTimeProp = DateTime.Now}" /> | ||
|
||
<p> | ||
<span>DateOnly.ToString: </span> | ||
<span data-ui="dateOnlyToString" InnerText="{value: DateOnly.FromDateTime(NullableDateTimeProp)}" /> | ||
</p> | ||
<p> | ||
<span>DateOnly properties: </span> | ||
<span data-ui="dateOnlyProperties"> | ||
{{value: DateOnly.FromDateTime(NullableDateTimeProp).Day}}. {{value: DateOnly.FromDateTime(NullableDateTimeProp).Month}}. {{value: DateOnly.FromDateTime(NullableDateTimeProp).Year}} | ||
</span> | ||
</p> | ||
</body> | ||
</html> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/Samples/Common/Views/FeatureSamples/JavascriptTranslation/TimeOnlyTranslations.dothtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@viewModel DotVVM.Samples.Common.ViewModels.FeatureSamples.JavascriptTranslation.DateTimeTranslationsViewModel, DotVVM.Samples.Common | ||
@import System | ||
|
||
<!DOCTYPE html> | ||
|
||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title></title> | ||
<style> | ||
*[data-ui] { | ||
font-weight: bold; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<h1>TimeOnly testing</h1> | ||
<dot:TextBox data-ui="textbox" Text="{value: NullableDateTimeProp}" /> | ||
<dot:Button Text="now" Click="{staticCommand: NullableDateTimeProp = DateTime.Now}" /> | ||
|
||
<p> | ||
<span>TimeOnly.ToString: </span> | ||
<span data-ui="timeOnlyToString" InnerText="{value: TimeOnly.FromDateTime(NullableDateTimeProp)}" /> | ||
</p> | ||
<p> | ||
<span>TimeOnly properties: </span> | ||
<span data-ui="timeOnlyProperties"> | ||
{{value: TimeOnly.FromDateTime(NullableDateTimeProp).Hour}} hours {{value: TimeOnly.FromDateTime(NullableDateTimeProp).Minute}} minues {{value: TimeOnly.FromDateTime(NullableDateTimeProp).Second}} seconds and {{value: TimeOnly.FromDateTime(NullableDateTimeProp).Millisecond}} milliseconds | ||
</span> | ||
|
||
</body> | ||
</html> | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters