Commit 43330c78 authored by Venubabu Sunkara's avatar Venubabu Sunkara

Date format added

parent 830932eb
Pipeline #47459 passed with stages
in 35 seconds
......@@ -19,7 +19,7 @@
<div class="sms_report">
<h1>SMS Reports</h1>
<div class="form-group mb-0">
<input type="date" class="form-control" id="theDate" placeholder="DD/MM/YYYY" />
<input type="text" class="form-control" id="theDate" placeholder="YYYY/MM/DD" />
</div>
</div>
</aside>
......
......@@ -6,16 +6,18 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@ViewData["Title"] - PharmaStoreReport</title>
<link href="~/css/main.min.css" rel="stylesheet" type="text/css" />
<link href="~/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap" rel="stylesheet" type="text/css">
</head>
<body>
@RenderBody()
@*<footer class="border-top footer text-muted">
<div class="container">
&copy; 2021 - PharmaStoreReport - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</div>
</footer>*@
<div class="container">
&copy; 2021 - PharmaStoreReport - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</div>
</footer>*@
<script src="~/js/main.min.js" type="text/javascript"></script>
<script src="~/js/bootstrap-datepicker.min.js" type="text/javascript"></script>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -3,9 +3,21 @@ var fileCount = 0;
var fileNames = [];
var pfileList = [];
$(function () {
ShowDatesInCalander();
$("#theDate").datepicker({
format: "d MM yyyy",
todayHighlight: true,
autoclose: true
}).datepicker("setDate", new Date());;
$("#Months").change(function () {
$('#txtMonth').val($('.months-drop :selected').text());
$('#txtMonth').val($('#Months option :selected').text());
var year = $('#Years option:selected').val();
var month = $('#Months option:selected').val();
if (year != "0" && month != "0") {
$("#theDate").datepicker("setDate", new Date(year + "-" + month + "-" + new Date().getDate()));
}
else {
$("#theDate").datepicker("setDate", new Date());
}
});
$('#Years').change(function () {
Year = $('#Years option:selected').val();
......@@ -35,6 +47,7 @@ $(function () {
var dropdown = $('#Months');
dropdown.empty();
dropdown.prepend('<option selected="selected" value="0"> Select Month </option>');
$("#theDate").datepicker("setDate", new Date());
}
});
$('.download-excels').click(function () {
......@@ -172,14 +185,4 @@ function RemoveItems() {
fileCount = fileCount - 1;
}
}
}
function ShowDatesInCalander() {
var date = new Date();
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
if (month < 10) month = "0" + month;
if (day < 10) day = "0" + day;
var today = year + "-" + month + "-" + day;
$("#theDate").attr("value", today);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment