Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
amo los bundlers
Browse files Browse the repository at this point in the history
  • Loading branch information
rats4final committed Dec 12, 2022
1 parent 1011b86 commit acbcd26
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 10 deletions.
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"vite": "^3.0.0"
},
"dependencies": {
"flatpickr": "^4.6.13",
"simple-datatables": "^3.2.2"
}
}
2 changes: 2 additions & 0 deletions resources/css/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "flatpickr/dist/flatpickr.min.css"; /*estilos del flatpickr*/
@import "flatpickr/dist/themes/material_green.css";
@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down
12 changes: 12 additions & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
/*jshint esversion: 6 */
import './bootstrap';
import flatpickr from "flatpickr";
import { Spanish } from "flatpickr/dist/l10n/es.js"


flatpickr("#myDate", {
"locale": Spanish,
enableTime: true,
dateFormat: "Y-m-d H:i",
minuteIncrement: 30, //XD
time_24hr: true,
weekNumbers: true,
});
30 changes: 21 additions & 9 deletions resources/js/vanilla-datatables.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
/*jshint esversion: 6 */
import {DataTable} from "simple-datatables";
const dataTable = new DataTable("#myTable");
document.querySelector("input.csv").addEventListener("click", () => {
dataTable.export({
type:"csv",
download: true,
lineDelimiter: "\n\n",
columnDelimiter: ";"
});
});

let tabla = document.getElementById('myTable');
if (tabla) {
const dataTable = new DataTable('#myTable');
}




// document.querySelector("input.csv").addEventListener("click", () => {
// dataTable.export({
// type:"csv",
// download: true,
// lineDelimiter: "\n\n",
// columnDelimiter: ";"
// });
// });




2 changes: 1 addition & 1 deletion resources/views/admin/Citas/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>

<label>Fecha</label></br>
<input type="datetime-local" name="fecha_cita" id="fecha_cita" class="form-control"></br>
<input type="datetime-local" name="fecha_cita" id="myDate" class="form-control"></br>
@error('fecha_cita')
<small style="color: red">{{$message}}</small>
@enderror
Expand Down

0 comments on commit acbcd26

Please sign in to comment.